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:
Laslo Hunhold 2018-07-02 18:41:29 +02:00
parent b354ffb238
commit 34189e0a1f

2
util.c
View file

@ -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);
}