s3:loadparm: fix a check that was accidentially an assignment in lp_servicebynum()
authorMichael Adam <obnox@samba.org>
Thu, 21 Jul 2011 12:10:50 +0000 (14:10 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 21 Jul 2011 15:24:16 +0000 (17:24 +0200)
source3/param/loadparm.c

index 875aa6ed755622cf059de1221efe2791279e3a34..e1c5aab2536baa20ac8f429fd7b293ded39868c1 100644 (file)
@@ -6421,7 +6421,7 @@ struct loadparm_service *lp_service(const char *pszServiceName)
 
 struct loadparm_service *lp_servicebynum(int snum)
 {
-       if (snum = -1 || !LP_SNUM_OK(snum)) {
+       if ((snum == -1) || !LP_SNUM_OK(snum)) {
                return NULL;
        }
        return ServicePtrs[snum];