Mark error() as __printflike() and fix a non-exploitable format string

error.

MFC after:	1 week
This commit is contained in:
Kris Kennaway 2001-05-25 23:15:05 +00:00
parent 5a3c3d039a
commit 096c40e3f3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77206
2 changed files with 2 additions and 2 deletions

View File

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

View File

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