Mark report() as printflike and fix resulting warnings, including one bug

(get_errmsg -> get_errmsg())
This commit is contained in:
kris 2002-02-04 01:28:45 +00:00
parent 4c37ccc7f2
commit af7d59aa2e
4 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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, \

View File

@ -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. */

View File

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