mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
util: LogCommandLine: argc is an int, so assert that it's positive
In practice, argc should never be negative, but by convention it's a signed int, so change the assertion to require it to be positive rather than merely nonzero to get some help to the static analyzer. Change-Id: I2d6c00b8ad2f8d573d717f1e2b88a4bb902f125c Reviewed-on: http://gerrit.openafs.org/7765 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
f4b2ad4dc9
commit
e194a8b7f8
@ -160,7 +160,7 @@ LogCommandLine(int argc, char **argv, const char *progname,
|
||||
int i, l;
|
||||
char *commandLine, *cx;
|
||||
|
||||
opr_Assert(argc != 0);
|
||||
opr_Assert(argc > 0);
|
||||
|
||||
for (l = i = 0; i < argc; i++)
|
||||
l += strlen(argv[i]) + 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user