s3.lib: Remove invalid switch case from sysquotas_nfs
authorAnoop C S <anoopcs@redhat.com>
Fri, 9 Oct 2015 11:32:52 +0000 (11:32 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 16 Oct 2015 18:24:20 +0000 (20:24 +0200)
getquota_rslt structure from rquota.h defines the enum
named status whose values start from 1. But in
sysquotas_nfs.c we have an invalid check for status 0.
This change is to remove that particular switch case.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/sysquotas_nfs.c

index 58eedf0a52e9264fad9dde86dc13e9325d81b0ec..4b37e34e624d5ca5f83a1a009f45141d7f018bce 100644 (file)
@@ -211,19 +211,12 @@ int sys_get_nfs_quota(const char *path, const char *bdev,
 
        /*
         * gqr.status returns
-        *   0 if the rpc call fails,
         *   1 if quotas exist,
         *   2 if there is no quota set, and
         *   3 if no permission to get the quota.
         */
 
        switch (gq_rslt.GQR_STATUS) {
-       case 0:
-               DEBUG(3, ("sys_get_nfs_quotas: Remote Quotas Failed! "
-                         "Error '%i'\n", gq_rslt.GQR_STATUS));
-               ret = -1;
-               goto out;
-
        case 1:
                DEBUG(10, ("sys_get_nfs_quotas: Good quota data\n"));
                dp->bsize = (uint64_t)gq_rslt.GQR_RQUOTA.rq_bsize;