afs: fix missing afs_nfs3_dispatcher return value 87/12987/3
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 30 Mar 2018 03:15:47 +0000 (23:15 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 14 Aug 2018 21:56:50 +0000 (17:56 -0400)
Fix a missing early return value in the function afs_nfs3_dispatcher.  All
callers check the return code of afs_nfs3_dispatcher and interpret values
greater that 1 to be errors. Return 3 as an error code for this code path,
which is the next available error code in afs_nfs3_dispatcher.

This commit fixes the following Solaris Studio warning message:

    ... warning: function expects to return value: afs_nfs3_dispatcher

Change-Id: I47b545bd57a46c03006b9f031da3647c8a530377
Reviewed-on: https://gerrit.openafs.org/12987
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/afs/afs_nfsdisp.c

index 01f8e2e..8eef43b 100644 (file)
@@ -1010,7 +1010,7 @@ afs_nfs3_dispatcher(int type, afs_int32 which, char *argp,
 
     sa = (struct sockaddr *)svc_getrpccaller(rp->rq_xprt)->buf;
     if (sa == NULL)
-       return;
+       return 3;
 
     if (sa->sa_family == AF_INET)
        client = ((struct sockaddr_in *)sa)->sin_addr.s_addr;