]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Intermediate variable to avoid compiler warning
authorAlan T. DeKok <aland@freeradius.org>
Tue, 13 Oct 2015 16:48:08 +0000 (12:48 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 13 Oct 2015 16:48:08 +0000 (12:48 -0400)
src/main/tls.c

index c1492910de7e5533b8eca58fb3497f4be5c48671..bc9e233d6a7b66744fbafeed7ff7afaa5b9624d9 100644 (file)
@@ -1304,6 +1304,7 @@ static SSL_SESSION *cbtls_get_session(SSL *ssl, unsigned char *data, int len, in
                int             rv, fd, todo;
                char            filename[256];
                unsigned char   *p;
+               unsigned char const *q;
                struct stat     st;
                VALUE_PAIR      *vps = NULL;
 
@@ -1354,8 +1355,8 @@ static SSL_SESSION *cbtls_get_session(SSL *ssl, unsigned char *data, int len, in
                close(fd);
 
                /* openssl mutates &p */
-               p = sess_data;
-               sess = d2i_SSL_SESSION(NULL, (unsigned char const **)(void **) &p, st.st_size);
+               q = sess_data;
+               sess = d2i_SSL_SESSION(NULL, &q, st.st_size);
 
                if (!sess) {
                        RWDEBUG("Failed loading persisted session: %s", ERR_error_string(ERR_get_error(), NULL));