diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-20 18:11:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-20 18:11:37 +0000 |
commit | c0572ea9929b86071dcce6d7a9616164c6450d71 (patch) | |
tree | 402349a123be43fb9ce8f2f381c8589d752ff456 /key-bindings.c | |
parent | b04bffc9c99045776abea011cc95f5819a939872 (diff) | |
download | rtmux-c0572ea9929b86071dcce6d7a9616164c6450d71.tar.gz rtmux-c0572ea9929b86071dcce6d7a9616164c6450d71.tar.bz2 rtmux-c0572ea9929b86071dcce6d7a9616164c6450d71.zip |
Fix a format string bug and sprinkle some printflikes.
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/key-bindings.c b/key-bindings.c index 6f165eaa..7be5df60 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -1,4 +1,4 @@ -/* $Id: key-bindings.c,v 1.15 2007-11-16 22:06:45 nicm Exp $ */ +/* $Id: key-bindings.c,v 1.16 2007-11-20 18:11:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -26,8 +26,8 @@ struct bindings key_bindings; -void key_bindings_error(struct cmd_ctx *, const char *, ...); -void key_bindings_print(struct cmd_ctx *, const char *, ...); +void printflike2 key_bindings_error(struct cmd_ctx *, const char *, ...); +void printflike2 key_bindings_print(struct cmd_ctx *, const char *, ...); void key_bindings_add(int key, struct cmd *cmd) @@ -141,7 +141,7 @@ key_bindings_free(void) ARRAY_FREE(&key_bindings); } -void +void printflike2 key_bindings_error(struct cmd_ctx *ctx, const char *fmt, ...) { va_list ap; @@ -152,11 +152,11 @@ key_bindings_error(struct cmd_ctx *ctx, const char *fmt, ...) va_end(ap); *msg = toupper((u_char) *msg); - server_write_message(ctx->client, msg); + server_write_message(ctx->client, "%s", msg); xfree(msg); } -void +void printflike2 key_bindings_print(struct cmd_ctx *ctx, const char *fmt, ...) { static u_int line; |