Mark error() as __printflike() and fix a non-exploitable format string
error. MFC after: 1 week
This commit is contained in:
parent
5a3c3d039a
commit
096c40e3f3
@ -90,7 +90,7 @@ void die __P((int));
|
||||
void display __P((int));
|
||||
int dkinit __P((void));
|
||||
int dkcmd __P((char *, char *));
|
||||
void error __P((const char *fmt, ...));
|
||||
void error __P((const char *fmt, ...)) __printflike(1, 2);
|
||||
void fetchicmp __P((void));
|
||||
void fetchip __P((void));
|
||||
void fetchiostat __P((void));
|
||||
|
@ -101,7 +101,7 @@ initswap()
|
||||
|
||||
if (kvm_getswapinfo(kd, &dummy, 1, 0) < 0) {
|
||||
snprintf(msgbuf, sizeof(msgbuf), "systat: kvm_getswapinfo failed");
|
||||
error(msgbuf);
|
||||
error("%s", msgbuf);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user