diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 875aa6ed755..e1c5aab2536 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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];