mirror of
https://github.com/bol-van/zapret2.git
synced 2026-06-17 12:50:04 +04:00
code cleanup based on cppcheck
nfq2/nfqws.c:1114:19: warning: Either the condition 'p' is redundant or there is possible null pointer dereference: p. [nullPointerRedundantCheck]
This commit is contained in:
+3
-6
@@ -1116,12 +1116,9 @@ static bool parse_uid(char *opt, uid_t *uid, gid_t *gid, int *gid_count, int max
|
||||
c = *e;
|
||||
*e = 0;
|
||||
}
|
||||
if (p)
|
||||
{
|
||||
if (sscanf(p, "%u", &u) != 1) return false;
|
||||
if (*gid_count >= max_gids) return false;
|
||||
gid[(*gid_count)++] = (gid_t)u;
|
||||
}
|
||||
if (sscanf(p, "%u", &u) != 1) return false;
|
||||
if (*gid_count >= max_gids) return false;
|
||||
gid[(*gid_count)++] = (gid_t)u;
|
||||
if (e) *e++ = c;
|
||||
p = e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user