From 66192a0052ec3f9936099a4d2c5512b4b0d89bf0 Mon Sep 17 00:00:00 2001 From: Axel Etcheverry Date: Thu, 14 Nov 2013 01:59:35 +0100 Subject: Add new redisAppendFormatedCommand with tests Closes #202 --- hiredis.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hiredis.c') diff --git a/hiredis.c b/hiredis.c index dcb13a5..b254903 100644 --- a/hiredis.c +++ b/hiredis.c @@ -1257,6 +1257,15 @@ int __redisAppendCommand(redisContext *c, char *cmd, size_t len) { return REDIS_OK; } +int redisAppendFormattedCommand(redisContext *c, char *format, size_t len) { + + if (__redisAppendCommand(c, format, len) != REDIS_OK) { + return REDIS_ERR; + } + + return REDIS_OK; +} + int redisvAppendCommand(redisContext *c, const char *format, va_list ap) { char *cmd; int len; -- cgit v1.2.3