mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Silence format string warnings.
MFC after: 2 weeks
This commit is contained in:
parent
1b6c76a2fe
commit
8fb0816a85
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79048
@ -95,7 +95,7 @@ static struct icmpcode icmpcodes[] = {
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void show_usage(const char *fmt, ...);
|
||||
static void show_usage(const char *fmt, ...) __printf0like(1, 2);
|
||||
|
||||
static int
|
||||
mask_bits(struct in_addr m_ad)
|
||||
@ -275,7 +275,7 @@ show_ipfw(struct ip_fw *chain)
|
||||
he = gethostbyaddr((char *)&adrt,
|
||||
sizeof(u_long), AF_INET);
|
||||
if (he == NULL)
|
||||
printf(inet_ntoa(chain->fw_src));
|
||||
printf("%s", inet_ntoa(chain->fw_src));
|
||||
else
|
||||
printf("%s", he->h_name);
|
||||
} else if (adrt != ULONG_MAX) {
|
||||
@ -283,15 +283,15 @@ show_ipfw(struct ip_fw *chain)
|
||||
if (mb == 0) {
|
||||
printf("any");
|
||||
} else if (mb > 0) {
|
||||
printf(inet_ntoa(chain->fw_src));
|
||||
printf("%s", inet_ntoa(chain->fw_src));
|
||||
printf("/%d", mb);
|
||||
} else {
|
||||
printf(inet_ntoa(chain->fw_src));
|
||||
printf("%s", inet_ntoa(chain->fw_src));
|
||||
printf(":");
|
||||
printf(inet_ntoa(chain->fw_smsk));
|
||||
printf("%s", inet_ntoa(chain->fw_smsk));
|
||||
}
|
||||
} else {
|
||||
printf(inet_ntoa(chain->fw_src));
|
||||
printf("%s", inet_ntoa(chain->fw_src));
|
||||
}
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ show_ipfw(struct ip_fw *chain)
|
||||
he = gethostbyaddr((char *)&adrt,
|
||||
sizeof(u_long), AF_INET);
|
||||
if (he == NULL)
|
||||
printf(inet_ntoa(chain->fw_dst));
|
||||
printf("%s", inet_ntoa(chain->fw_dst));
|
||||
else
|
||||
printf("%s", he->h_name);
|
||||
} else if (adrt != ULONG_MAX) {
|
||||
@ -328,15 +328,15 @@ show_ipfw(struct ip_fw *chain)
|
||||
if (mb == 0) {
|
||||
printf("any");
|
||||
} else if (mb > 0) {
|
||||
printf(inet_ntoa(chain->fw_dst));
|
||||
printf("%s", inet_ntoa(chain->fw_dst));
|
||||
printf("/%d", mb);
|
||||
} else {
|
||||
printf(inet_ntoa(chain->fw_dst));
|
||||
printf("%s", inet_ntoa(chain->fw_dst));
|
||||
printf(":");
|
||||
printf(inet_ntoa(chain->fw_dmsk));
|
||||
printf("%s", inet_ntoa(chain->fw_dmsk));
|
||||
}
|
||||
} else {
|
||||
printf(inet_ntoa(chain->fw_dst));
|
||||
printf("%s", inet_ntoa(chain->fw_dst));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user