aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2001-07-01 22:00:26 +0000
committerKris Kennaway <kris@FreeBSD.org>2001-07-01 22:00:26 +0000
commit8fb0816a85f30fe32981c1bc5c902cf05611bed5 (patch)
treefa5dd28cb67fb8ebc471ad01a060f850431d6dc1 /sbin
parent1b6c76a2fe091c74f08427e6c870851025a9cf67 (diff)
downloadsrc-8fb0816a85f30fe32981c1bc5c902cf05611bed5.tar.gz
src-8fb0816a85f30fe32981c1bc5c902cf05611bed5.zip
Silence format string warnings.
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=79048
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw.c22
1 files changed, 11 insertions, 11 deletions
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));
}
}