aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-20 11:35:16 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-20 11:35:16 +0000
commit52b02850ca960f5f540176036200a83ca73f1267 (patch)
tree50dcead8641361e8336b3614e43b78cea8ee3198
parent7ca3d7ac8ef68cffcd18b64558ae3c7c00875479 (diff)
downloadrtmux-52b02850ca960f5f540176036200a83ca73f1267.tar.gz
rtmux-52b02850ca960f5f540176036200a83ca73f1267.tar.bz2
rtmux-52b02850ca960f5f540176036200a83ca73f1267.zip
Sync OpenBSD patchset 270:
Tag a few missed printf-like functions and fix a missing "%s".
-rw-r--r--cmd-server-info.c10
-rw-r--r--cmd-show-buffer.c4
-rw-r--r--tmux.h12
3 files changed, 13 insertions, 13 deletions
diff --git a/cmd-server-info.c b/cmd-server-info.c
index 3955ed75..93f56e6f 100644
--- a/cmd-server-info.c
+++ b/cmd-server-info.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-server-info.c,v 1.25 2009-08-14 21:04:04 tcunha Exp $ */
+/* $Id: cmd-server-info.c,v 1.26 2009-08-20 11:35:16 tcunha 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/cmd-show-buffer.c b/cmd-show-buffer.c
index 0496bbfb..58634f42 100644
--- a/cmd-show-buffer.c
+++ b/cmd-show-buffer.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-show-buffer.c,v 1.8 2009-08-20 11:33:13 tcunha Exp $ */
+/* $Id: cmd-show-buffer.c,v 1.9 2009-08-20 11:35:16 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -93,7 +93,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/tmux.h b/tmux.h
index 7a672d88..f8b14540 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.422 2009-08-20 11:22:48 tcunha Exp $ */
+/* $Id: tmux.h,v 1.423 2009-08-20 11:35:16 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -989,9 +989,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 {
@@ -1720,8 +1720,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 *);