diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-08-18 14:48:43 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-08-18 14:48:43 +0000 |
commit | d940e44bba9c3e15c9fa06cdab5fac8e3c0a55b5 (patch) | |
tree | 770a788df1e3f6603a930c074a089ca720e24b35 /usr.bin | |
parent | 1aa6655f51dc5eded46f78f15cdce44acd756887 (diff) |
Tag a few missed printf-like functions and fix a missing "%s".
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-server-info.c | 10 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-show-buffer.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/tmux/cmd-server-info.c b/usr.bin/tmux/cmd-server-info.c index 2785d951429..da3b9ad516f 100644 --- a/usr.bin/tmux/cmd-server-info.c +++ b/usr.bin/tmux/cmd-server-info.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-server-info.c,v 1.7 2009/08/11 17:18:35 nicm Exp $ */ +/* $OpenBSD: cmd-server-info.c,v 1.8 2009/08/18 14:48:42 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -81,7 +81,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) ctx->print(ctx, "protocol version is %d", PROTOCOL_VERSION); ctx->print(ctx, "%u clients, %u sessions", ARRAY_LENGTH(&clients), ARRAY_LENGTH(&sessions)); - ctx->print(ctx, ""); + ctx->print(ctx, "%s", ""); ctx->print(ctx, "Clients:"); for (i = 0; i < ARRAY_LENGTH(&clients); i++) { @@ -94,7 +94,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) c->session->name, c->tty.sx, c->tty.sy, c->tty.termname, c->flags, c->tty.flags); } - ctx->print(ctx, ""); + ctx->print(ctx, "%s", ""); ctx->print(ctx, "Sessions: [%zu/%zu]", sizeof (struct grid_cell), sizeof (struct grid_utf8)); @@ -142,7 +142,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) } } } - ctx->print(ctx, ""); + ctx->print(ctx, "%s", ""); ctx->print(ctx, "Terminals:"); SLIST_FOREACH(term, &tty_terms, entry) { @@ -174,7 +174,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) } } } - ctx->print(ctx, ""); + ctx->print(ctx, "%s", ""); return (0); } diff --git a/usr.bin/tmux/cmd-show-buffer.c b/usr.bin/tmux/cmd-show-buffer.c index 50684676cab..bff4d35ae6d 100644 --- a/usr.bin/tmux/cmd-show-buffer.c +++ b/usr.bin/tmux/cmd-show-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-buffer.c,v 1.4 2009/08/18 13:08:43 nicm Exp $ */ +/* $OpenBSD: cmd-show-buffer.c,v 1.5 2009/08/18 14:48:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -94,7 +94,7 @@ cmd_show_buffer_exec(struct cmd *self, struct cmd_ctx *ctx) if (len != 0) { buf[len] = '\0'; - ctx->print(ctx, buf); + ctx->print(ctx, "%s", buf); } xfree(buf); diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 1dbb464bc90..fa7403e74be 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.84 2009/08/18 07:23:43 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.85 2009/08/18 14:48:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -991,9 +991,9 @@ struct cmd_ctx { struct msg_command_data *msgdata; - void (*print)(struct cmd_ctx *, const char *, ...); - void (*info)(struct cmd_ctx *, const char *, ...); - void (*error)(struct cmd_ctx *, const char *, ...); + void printflike2 (*print)(struct cmd_ctx *, const char *, ...); + void printflike2 (*info)(struct cmd_ctx *, const char *, ...); + void printflike2 (*error)(struct cmd_ctx *, const char *, ...); }; struct cmd { @@ -1722,8 +1722,8 @@ void printflike1 log_warnx(const char *, ...); void printflike1 log_info(const char *, ...); void printflike1 log_debug(const char *, ...); void printflike1 log_debug2(const char *, ...); -__dead void log_fatal(const char *, ...); -__dead void log_fatalx(const char *, ...); +__dead void printflike1 log_fatal(const char *, ...); +__dead void printflike1 log_fatalx(const char *, ...); /* xmalloc.c */ char *xstrdup(const char *); |