]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use correct type. Closes #1998
authorAlan T. DeKok <aland@freeradius.org>
Thu, 1 Jun 2017 11:27:41 +0000 (07:27 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 1 Jun 2017 11:27:41 +0000 (07:27 -0400)
It's better to pass the right type to a function, and cast it
on return.

src/main/tls/cache.c

index 52f054948ab6ed7e8ecff6ab5a5fd6a28419f6b7..8008a5b84bc0dad52d1c0f62b9571edaa33c2914 100644 (file)
@@ -152,9 +152,9 @@ inline static ssize_t tls_cache_id(uint8_t const **out, SSL_SESSION *sess)
        *out = sess->session_id;
        return sess->session_id_length;
 #else
-       size_t len;
+       unsigned int len;
 
-       *out = SSL_SESSION_get_id(sess, (unsigned int *)&len);
+       *out = SSL_SESSION_get_id(sess, &len);
        return len;
 #endif
 }