summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--games/boggle/boggle/bog.c10
-rw-r--r--sbin/wsconsctl/display.c6
-rw-r--r--usr.bin/netstat/inet.c50
-rw-r--r--usr.bin/netstat/inet6.c12
-rw-r--r--usr.bin/netstat/unix.c4
-rw-r--r--usr.bin/rdist/client.c6
-rw-r--r--usr.sbin/bgpctl/bgpctl.c6
-rw-r--r--usr.sbin/httpd/src/main/http_log.c4
-rw-r--r--usr.sbin/ypserv/mknetid/mknetid.c8
9 files changed, 53 insertions, 53 deletions
diff --git a/games/boggle/boggle/bog.c b/games/boggle/boggle/bog.c
index bfaf04afa61..52a399c5291 100644
--- a/games/boggle/boggle/bog.c
+++ b/games/boggle/boggle/bog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bog.c,v 1.21 2012/03/04 04:05:15 fgsch Exp $ */
+/* $OpenBSD: bog.c,v 1.22 2013/08/18 16:32:24 guenther Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
@@ -331,7 +331,7 @@ playgame(void)
maxpwords * sizeof(char *));
if (pword == NULL) {
cleanup();
- errx(1, strerror(ENOMEM));
+ errx(1, "%s", strerror(ENOMEM));
}
}
len = strlen(buf) + 1;
@@ -340,7 +340,7 @@ playgame(void)
pwords = realloc(pwords, maxpspace);
if (pwords == NULL) {
cleanup();
- errx(1, strerror(ENOMEM));
+ errx(1, "%s", strerror(ENOMEM));
}
}
pword[npwords++] = pwordsp;
@@ -558,7 +558,7 @@ checkdict(void)
mword = realloc(mword, maxmwords * sizeof(char *));
if (mword == NULL) {
cleanup();
- errx(1, strerror(ENOMEM));
+ errx(1, "%s", strerror(ENOMEM));
}
}
if (mwordsp + wordlen + 1 >= &mwords[maxmspace]) {
@@ -566,7 +566,7 @@ checkdict(void)
mwords = realloc(mwords, maxmspace);
if (mwords == NULL) {
cleanup();
- errx(1, strerror(ENOMEM));
+ errx(1, "%s", strerror(ENOMEM));
}
}
mword[nmwords++] = mwordsp;
diff --git a/sbin/wsconsctl/display.c b/sbin/wsconsctl/display.c
index f33e10e9315..d887020d5b7 100644
--- a/sbin/wsconsctl/display.c
+++ b/sbin/wsconsctl/display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: display.c,v 1.17 2012/08/08 16:44:07 shadchin Exp $ */
+/* $OpenBSD: display.c,v 1.18 2013/08/18 16:32:23 guenther Exp $ */
/* $NetBSD: display.c,v 1.1 1998/12/28 14:01:16 hannken Exp $ */
/*-
@@ -141,7 +141,7 @@ display_get_values(int fd)
pf->flags |= FLG_DEAD;
continue;
} else
- warn(cmd_str);
+ warn("%s", cmd_str);
}
}
@@ -252,7 +252,7 @@ display_put_values(int fd)
pf->flags |= FLG_DEAD;
continue;
} else {
- warn(cmd_str);
+ warn("%s", cmd_str);
return 1;
}
}
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index 077b922465b..d63a1cedc7e 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet.c,v 1.123 2013/04/18 15:43:22 deraadt Exp $ */
+/* $OpenBSD: inet.c,v 1.124 2013/08/18 16:32:24 guenther Exp $ */
/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */
/*
@@ -258,7 +258,7 @@ tcp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&tcpstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -389,7 +389,7 @@ udp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&udpstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -435,7 +435,7 @@ ip_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&ipstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -494,7 +494,7 @@ div_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&divstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -570,7 +570,7 @@ icmp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&icmpstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -628,7 +628,7 @@ igmp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&igmpstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -664,7 +664,7 @@ pim_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&pimstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -858,7 +858,7 @@ ah_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&ahstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -904,7 +904,7 @@ etherip_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&etheripstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -937,7 +937,7 @@ esp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&espstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -984,7 +984,7 @@ ipip_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&ipipstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -1018,7 +1018,7 @@ carp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&carpstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -1060,7 +1060,7 @@ pfsync_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&pfsyncstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -1103,7 +1103,7 @@ pflow_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &flowstats, &len,
NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -1134,7 +1134,7 @@ ipcomp_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&ipcompstat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -1178,10 +1178,10 @@ socket_dump(u_long off)
#define pll(fmt, v, sep) printf(#v " " fmt sep, (long long) so.v);
#define pp(fmt, v, sep) printf(#v " " fmt sep, hideroot ? 0 : so.v);
printf("socket %#lx\n ", hideroot ? 0 : off);
- p("%#0.4x", so_type, "\n ");
- p("%#0.4x", so_options, "\n ");
+ p("%#.4x", so_type, "\n ");
+ p("%#.4x", so_options, "\n ");
p("%d", so_linger, "\n ");
- p("%#0.4x", so_state, "\n ");
+ p("%#.4x", so_state, "\n ");
pp("%p", so_pcb, ", ");
pp("%p", so_proto, ", ");
pp("%p", so_head, "\n ");
@@ -1232,8 +1232,8 @@ sockbuf_dump(struct sockbuf *sb, const char *name)
p("%lu", sb_mbmax, ", ");
p("%ld", sb_lowat, "\n ");
printf("%s ", name);
- p("%#0.8x", sb_flagsintr, ", ");
- p("%#0.4x", sb_flags, ", ");
+ p("%#.8x", sb_flagsintr, ", ");
+ p("%#.4x", sb_flags, ", ");
p("%u", sb_timeo, "\n ");
#undef p
}
@@ -1253,10 +1253,10 @@ protosw_dump(u_long off, u_long pcb)
#define p(fmt, v, sep) printf(#v " " fmt sep, proto.v);
#define pp(fmt, v, sep) printf(#v " " fmt sep, hideroot ? 0 : proto.v);
printf("protosw %#lx\n ", hideroot ? 0 : off);
- p("%#0.4x", pr_type, "\n ");
+ p("%#.4x", pr_type, "\n ");
pp("%p", pr_domain, "\n ");
p("%d", pr_protocol, "\n ");
- p("%#0.4x", pr_flags, "\n");
+ p("%#.4x", pr_flags, "\n");
#undef p
#undef pp
@@ -1280,7 +1280,7 @@ domain_dump(u_long off, u_long pcb, short protocol)
#define p(fmt, v, sep) printf(#v " " fmt sep, dom.v);
printf("domain %#lx\n ", hideroot ? 0 : off);
p("%d", dom_family, "\n ");
- printf("dom_name %.*s\n", sizeof(name), name);
+ printf("dom_name %.*s\n", (int)sizeof(name), name);
#undef p
switch (dom.dom_family) {
@@ -1330,7 +1330,7 @@ inpcb_dump(u_long off, short protocol, int af)
p("%u", inp_lport, "\n ");
pp("%p", inp_socket, ", ");
pp("%p", inp_ppcb, "\n ");
- p("%#0.8x", inp_flags, "\n ");
+ p("%#.8x", inp_flags, "\n ");
p("%d", inp_hops, "\n ");
p("%u", inp_seclevel[0], ", ");
p("%u", inp_seclevel[1], ", ");
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index 85e1c542c37..9dd2fac4629 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet6.c,v 1.43 2012/12/04 02:30:34 deraadt Exp $ */
+/* $OpenBSD: inet6.c,v 1.44 2013/08/18 16:32:24 guenther Exp $ */
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
/*
* Copyright (c) 1983, 1988, 1993
@@ -343,7 +343,7 @@ ip6_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&ip6stat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -822,7 +822,7 @@ icmp6_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&icmp6stat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -967,7 +967,7 @@ pim6_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&pim6stat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -999,7 +999,7 @@ rip6_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&rip6stat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
@@ -1039,7 +1039,7 @@ div6_stats(char *name)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
&div6stat, &len, NULL, 0) == -1) {
if (errno != ENOPROTOOPT)
- warn(name);
+ warn("%s", name);
return;
}
diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c
index 3323355806a..2a95b272499 100644
--- a/usr.bin/netstat/unix.c
+++ b/usr.bin/netstat/unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.c,v 1.19 2013/04/23 23:32:46 deraadt Exp $ */
+/* $OpenBSD: unix.c,v 1.20 2013/08/18 16:32:24 guenther Exp $ */
/* $NetBSD: unix.c,v 1.13 1995/10/03 21:42:48 thorpej Exp $ */
/*-
@@ -159,7 +159,7 @@ unpcb_dump(u_long off)
pp("%p", unp_refs, ", ");
pp("%p", unp_nextref, "\n ");
pp("%p", unp_addr, "\n ");
- p("%#0.8x", unp_flags, "\n ");
+ p("%#.8x", unp_flags, "\n ");
p("%u", unp_connid.uid, ", ");
p("%u", unp_connid.gid, ", ");
p("%d", unp_connid.pid, "\n ");
diff --git a/usr.bin/rdist/client.c b/usr.bin/rdist/client.c
index 3c140e8df18..8189cb3fa48 100644
--- a/usr.bin/rdist/client.c
+++ b/usr.bin/rdist/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.25 2012/11/12 01:18:37 guenther Exp $ */
+/* $OpenBSD: client.c,v 1.26 2013/08/18 16:32:24 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -256,7 +256,7 @@ runcmdspecial(struct cmd *cmd, opt_t opts)
return;
first = FALSE;
}
- (void) sendcmd(RC_FILE, f->n_name);
+ (void) sendcmd(RC_FILE, "%s", f->n_name);
if (response() < 0)
return;
}
@@ -267,7 +267,7 @@ runcmdspecial(struct cmd *cmd, opt_t opts)
first = FALSE;
}
/* Send command to run and wait for it to complete */
- (void) sendcmd(RC_COMMAND, sc->sc_name);
+ (void) sendcmd(RC_COMMAND, "%s", sc->sc_name);
while (response() > 0)
;
first = TRUE; /* Reset in case there are more CMDSPECIAL's */
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index a23699aa12d..c62f476c059 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.170 2013/04/09 14:51:33 gilles Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.171 2013/08/18 16:32:24 guenther Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -1819,11 +1819,11 @@ log_warn(const char *emsg, ...)
void
fatal(const char *emsg)
{
- err(1, emsg);
+ err(1, "%s", emsg);
}
void
fatalx(const char *emsg)
{
- errx(1, emsg);
+ errx(1, "%s", emsg);
}
diff --git a/usr.sbin/httpd/src/main/http_log.c b/usr.sbin/httpd/src/main/http_log.c
index 1230d2175d2..81ba126074b 100644
--- a/usr.sbin/httpd/src/main/http_log.c
+++ b/usr.sbin/httpd/src/main/http_log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: http_log.c,v 1.19 2008/05/14 09:25:38 mbalmer Exp $ */
+/* $OpenBSD: http_log.c,v 1.20 2013/08/18 16:32:24 guenther Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
@@ -371,7 +371,7 @@ ap_log_pid(pool *p, char *fname)
* that may screw up scripts written to do something
* based on the last modification time of the pid file.
*/
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, NULL,
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, NULL, "%s",
ap_psprintf(p, "pid file %s overwritten -- Unclean shutdown"
" of previous Apache run?", fname));
diff --git a/usr.sbin/ypserv/mknetid/mknetid.c b/usr.sbin/ypserv/mknetid/mknetid.c
index 3ba3ecf4d89..6dbbf3b876a 100644
--- a/usr.sbin/ypserv/mknetid/mknetid.c
+++ b/usr.sbin/ypserv/mknetid/mknetid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mknetid.c,v 1.18 2009/12/20 12:33:59 schwarze Exp $ */
+/* $OpenBSD: mknetid.c,v 1.19 2013/08/18 16:32:24 guenther Exp $ */
/*
* Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
@@ -522,15 +522,15 @@ main(int argc, char *argv[])
if (pfile == NULL)
pfile = fopen(MasterPasswdFile, "r");
if (pfile == NULL)
- err(1, MasterPasswdFile);
+ err(1, "%s", MasterPasswdFile);
gfile = fopen(GroupFile, "r");
if (gfile == NULL)
- err(1, GroupFile);
+ err(1, "%s", GroupFile);
hfile = fopen(HostFile, "r");
if (hfile == NULL)
- err(1, HostFile);
+ err(1, "%s", HostFile);
mfile = fopen(NetidFile, "r");