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 3c9a89a..2bb708f 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\"",