summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2015-10-20 11:23:23 +0530
committerJeremy Allison <jra@samba.org>2015-10-24 01:31:21 +0200
commit11620aefac77ebeb58cce784d20d4415d227f4ee (patch)
tree8a03d232bf165e311951911fe0d5164708d19c3f
parent3e6af7109eb9d49328b426095580e4bfb2338ceb (diff)
downloadsamba-11620aefac77ebeb58cce784d20d4415d227f4ee.tar.gz
smbd/quotas: Remove invalid quota status switch case
getquota_rslt structure from rquota.h defines the enum named status whose values start from 1. But in quotas.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> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Oct 24 01:31:21 CEST 2015 on sn-devel-104
-rw-r--r--source3/smbd/quotas.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index c64b63a4a36..3b23e6b2abe 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -171,17 +171,12 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t
}
/*
- * 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. If 0 or 3 return
- * something sensible.
+ * gqr.status returns 1 if quotas exist, 2 if there is
+ * no quota set, and 3 if no permission to get the quota.
+ * If 3, return something sensible.
*/
switch (gqr.status) {
- case 0:
- DEBUG(9,("nfs_quotas: Remote Quotas Failed! Error \"%i\" \n", gqr.status));
- ret = False;
- goto out;
-
case 1:
DEBUG(9,("nfs_quotas: Good quota data\n"));
D.dqb_bsoftlimit = gqr.getquota_rslt_u.gqr_rquota.rq_bsoftlimit;
@@ -197,8 +192,10 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t
break;
default:
- DEBUG(9,("nfs_quotas: Remote Quotas Questionable! Error \"%i\" \n", gqr.status ));
- break;
+ DEBUG(9, ("nfs_quotas: Unknown Remote Quota Status \"%i\"\n",
+ gqr.status));
+ ret = false;
+ goto out;
}
DEBUG(10,("nfs_quotas: Let`s look at D a bit closer... status \"%i\" bsize \"%i\" active? \"%i\" bhard \"%i\" bsoft \"%i\" curb \"%i\" \n",