Don't call errx() with a variable format string
MFC after: 1 week
This commit is contained in:
parent
53ab587043
commit
57c6bd978f
@ -198,7 +198,7 @@ get_positive(const char *s, const char *err_mess, int fussyP) {
|
||||
char *t;
|
||||
long result = strtol(s,&t,0);
|
||||
if (*t) { if (fussyP) goto Lose; else return 0; }
|
||||
if (result<=0) { Lose: errx(EX_USAGE, err_mess); }
|
||||
if (result<=0) { Lose: errx(EX_USAGE, "%s", err_mess); }
|
||||
return (size_t) result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user