diff options
author | kris <kris@FreeBSD.org> | 2001-07-01 22:00:26 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-07-01 22:00:26 +0000 |
commit | 172724d2a024b48cda772628efcc88486f138657 (patch) | |
tree | fa5dd28cb67fb8ebc471ad01a060f850431d6dc1 /sbin/ipfw/ipfw.c | |
parent | 0cd79cefcce3fe6d803d58071949bd61ba8f596c (diff) | |
download | FreeBSD-src-172724d2a024b48cda772628efcc88486f138657.zip FreeBSD-src-172724d2a024b48cda772628efcc88486f138657.tar.gz |
Silence format string warnings.
MFC after: 2 weeks
Diffstat (limited to 'sbin/ipfw/ipfw.c')
-rw-r--r-- | sbin/ipfw/ipfw.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index af71e1e..407540e 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -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)); } } |