From e7678fb5fb6725055b576b86f6ef994594f0bb92 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Thu, 29 Mar 2018 23:15:47 -0400 Subject: [PATCH] afs: fix missing afs_nfs3_dispatcher return value 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 Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Tested-by: BuildBot --- src/afs/afs_nfsdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/afs_nfsdisp.c b/src/afs/afs_nfsdisp.c index 01f8e2e..8eef43b 100644 --- a/src/afs/afs_nfsdisp.c +++ b/src/afs/afs_nfsdisp.c @@ -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; -- 1.9.4