]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix compiler warnings
authorAlan T. DeKok <aland@freeradius.org>
Wed, 16 May 2012 09:11:38 +0000 (11:11 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 11 Jun 2012 10:14:05 +0000 (12:14 +0200)
src/main/command.c

index f10c8339def992e83f56af7097d614dd7f669456..0a061517cb69f20ee28255323b90a1206080d833 100644 (file)
@@ -2117,7 +2117,7 @@ static int command_socket_parse_unix(CONF_SECTION *cs, rad_listen_t *this)
         *      Don't chown it from (possibly) non-root to root.
         *      Do chown it from (possibly) root to non-root.
         */
-       if ((sock->uid != -1) || (sock->gid != -1)) {
+       if ((sock->uid != (uid_t) -1) || (sock->gid != (gid_t) -1)) {
                fr_suid_up();
                if (fchown(this->fd, sock->uid, sock->gid) < 0) {
                        radlog(L_ERR, "Failed setting ownership of %s: %s",
@@ -2539,10 +2539,12 @@ static int command_tcp_recv(rad_listen_t *this)
                        if (co->offset < 16) return 0;
                }
 
-               fr_hmac_md5(sock->client->secret, strlen(sock->client->secret),
-                           co->buffer, 16, expected);
+               fr_hmac_md5((void *) sock->client->secret,
+                           strlen(sock->client->secret),
+                           (uint8_t *) co->buffer, 16, expected);
 
-               if (rad_digest_cmp(expected, co->buffer + 16, 16 != 0)) {
+               if (rad_digest_cmp(expected,
+                                  (uint8_t *) co->buffer + 16, 16 != 0)) {
                        radlog(L_ERR, "radmin failed challenge: Closing socket");
                        goto close_socket;
                }