Don't call errx() with a variable format string
MFC after: 1 week
This commit is contained in:
parent
53ab587043
commit
57c6bd978f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81510
@ -198,7 +198,7 @@ get_positive(const char *s, const char *err_mess, int fussyP) {
|
|||||||
char *t;
|
char *t;
|
||||||
long result = strtol(s,&t,0);
|
long result = strtol(s,&t,0);
|
||||||
if (*t) { if (fussyP) goto Lose; else return 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;
|
return (size_t) result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user