diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index af71e1e5bde7..407540e8365d 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)); } }