printf 'hh' length modifier is a gnu extension. Don't use it.

This commit is contained in:
Nicholas J. Kain 2014-03-25 05:27:47 -04:00
parent 00e7e2a61b
commit 77ce7b9a6c
2 changed files with 2 additions and 2 deletions

View File

@ -520,7 +520,7 @@ static int validate_dhcp_packet(struct client_state_t *cs, size_t len,
return 0;
}
if (memcmp(packet->chaddr, client_config.arp, sizeof client_config.arp)) {
log_line("Packet client MAC %2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx does not equal our MAC %2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx. Ignoring it.",
log_line("Packet client MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x does not equal our MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x. Ignoring it.",
packet->chaddr[0], packet->chaddr[1], packet->chaddr[2],
packet->chaddr[3], packet->chaddr[4], packet->chaddr[5],
client_config.arp[0], client_config.arp[1],

View File

@ -65,7 +65,7 @@ static void get_iaid_path(char *iaidfile, size_t ilen, uint8_t *hwaddr,
}
int splen = snprintf
(iaidfile, ilen,
"%s/IAID-%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx",
"%s/IAID-%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",
state_dir, hwaddr[0], hwaddr[1], hwaddr[2],
hwaddr[3], hwaddr[4], hwaddr[5]);
if (splen < 0) {