Use sizeof() - 1 rather than strlen()
I know, most compiler probably optimize this anyway, but why not do it right in the first place?
This commit is contained in:
parent
b354ffb238
commit
34189e0a1f
1 changed files with 1 additions and 1 deletions
2
util.c
2
util.c
|
@ -17,7 +17,7 @@ struct server s;
|
|||
static void
|
||||
verr(const char *fmt, va_list ap)
|
||||
{
|
||||
if (argv0 && strncmp(fmt, "usage", strlen("usage"))) {
|
||||
if (argv0 && strncmp(fmt, "usage", sizeof("usage") - 1)) {
|
||||
fprintf(stderr, "%s: ", argv0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue