Mark report() as printflike and fix resulting warnings, including one bug
(get_errmsg -> get_errmsg())
This commit is contained in:
parent
4c37ccc7f2
commit
af7d59aa2e
@ -1239,7 +1239,7 @@ dovend_rfc1048(bp, hp, bootsize)
|
||||
int bytesleft, len;
|
||||
byte *vp;
|
||||
|
||||
static char noroom[] = "%s: No room for \"%s\" option";
|
||||
static const char noroom[] = "%s: No room for \"%s\" option";
|
||||
|
||||
vp = bp->bp_vend;
|
||||
|
||||
|
@ -59,7 +59,7 @@ dovend_rfc1497(hp, buf, len)
|
||||
int bytesleft = len;
|
||||
byte *vp = buf;
|
||||
|
||||
static char noroom[] = "%s: No room for \"%s\" option";
|
||||
static const char noroom[] = "%s: No room for \"%s\" option";
|
||||
#define NEED(LEN, MSG) do \
|
||||
if (bytesleft < (LEN)) { \
|
||||
report(LOG_NOTICE, noroom, \
|
||||
|
@ -139,7 +139,7 @@ getether(ifname, eap)
|
||||
ifc.ifc_buf = (caddr_t) ibuf;
|
||||
if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 ||
|
||||
ifc.ifc_len < sizeof(struct ifreq)) {
|
||||
report(LOG_ERR, "getether: SIOCGIFCONF: %s", get_errmsg);
|
||||
report(LOG_ERR, "getether: SIOCGIFCONF: %s", get_errmsg());
|
||||
goto out;
|
||||
}
|
||||
/* Search interface configuration list for link layer address. */
|
||||
|
@ -8,7 +8,7 @@
|
||||
#endif
|
||||
|
||||
extern void report_init P((int nolog));
|
||||
extern void report P((int, const char *, ...));
|
||||
extern void report P((int, const char *, ...)) __printflike(2, 3);
|
||||
extern const char *get_errmsg P((void));
|
||||
|
||||
#undef P
|
||||
|
Loading…
Reference in New Issue
Block a user