]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mountd: address a minor compiler warning
authorChuck Lever <chuck.lever@oracle.com>
Thu, 11 Oct 2007 20:52:03 +0000 (16:52 -0400)
committerNeil Brown <neilb@suse.de>
Thu, 11 Oct 2007 23:05:30 +0000 (09:05 +1000)
auth.c: In function ‘auth_authenticate’:
auth.c:190: warning: ‘error’ may be used uninitialized in this function

"error" is used as an output parameter, but the compiler has no way of
knowing that.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mountd/auth.c

index 3c9a89a94dcdc7de5f76e175909ebf770c0d3304..2bb708ff138dfe23897156cc19597350d0c607af 100644 (file)
@@ -187,7 +187,7 @@ auth_authenticate(char *what, struct sockaddr_in *caller, char *path)
        char            *p = NULL;
        struct hostent  *hp = NULL;
        struct in_addr  addr = caller->sin_addr;
-       enum auth_error error;
+       enum auth_error error = bad_path;
 
        if (path [0] != '/') {
                xlog(L_WARNING, "bad path in %s request from %s: \"%s\"",