From: Anoop C S Date: Tue, 20 Oct 2015 05:53:23 +0000 (+0530) Subject: smbd/quotas: Remove invalid quota status switch case X-Git-Tag: ldb-1.1.22~9 X-Git-Url: http://git.samba.org/samba.git/?p=garming%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=11620aefac77ebeb58cce784d20d4415d227f4ee 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 Reviewed-by: Michael Adam Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Oct 24 01:31:21 CEST 2015 on sn-devel-104 --- 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",