diff options
author | cubicdaiya <cubicdaiya@gmail.com> | 2014-03-16 08:51:54 +0900 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-08-08 10:05:32 +0200 |
commit | 23f08510d5c63a1936bced5a3aaf7ae4860090f9 (patch) | |
tree | dc8453fa5468356409578fdbfa548692367c64db /src/redis-cli.c | |
parent | 8db020e2a1255a2595b5c4215271dcbad3b9aac2 (diff) | |
download | redis-23f08510d5c63a1936bced5a3aaf7ae4860090f9.tar.gz |
Use 'void' for zero-argument functions
According to the C standard,
it is desirable to give the type 'void'
to functions have no argument.
Closes #1631
Diffstat (limited to 'src/redis-cli.c')
-rw-r--r-- | src/redis-cli.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c index eafeb1907..d892e80c3 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -98,7 +98,7 @@ static struct config { } config; static volatile sig_atomic_t force_cancel_loop = 0; -static void usage(); +static void usage(void); static void slaveMode(void); char *redisGitSHA1(void); char *redisGitDirty(void); @@ -158,7 +158,7 @@ typedef struct { static helpEntry *helpEntries; static int helpEntriesLen; -static sds cliVersion() { +static sds cliVersion(void) { sds version; version = sdscatprintf(sdsempty(), "%s", REDIS_VERSION); @@ -172,7 +172,7 @@ static sds cliVersion() { return version; } -static void cliInitHelp() { +static void cliInitHelp(void) { int commandslen = sizeof(commandHelp)/sizeof(struct commandHelp); int groupslen = sizeof(commandGroups)/sizeof(char*); int i, len, pos = 0; @@ -211,7 +211,7 @@ static void cliOutputCommandHelp(struct commandHelp *help, int group) { } /* Print generic help. */ -static void cliOutputGenericHelp() { +static void cliOutputGenericHelp(void) { sds version = cliVersion(); printf( "redis-cli %s\r\n" @@ -368,7 +368,7 @@ static int cliConnect(int force) { return REDIS_OK; } -static void cliPrintContextError() { +static void cliPrintContextError(void) { if (context == NULL) return; fprintf(stderr,"Error: %s\n",context->errstr); } @@ -805,7 +805,7 @@ static sds readArgFromStdin(void) { return arg; } -static void usage() { +static void usage(void) { sds version = cliVersion(); fprintf(stderr, "redis-cli %s\n" @@ -874,7 +874,7 @@ static char **convertToSds(int count, char** args) { } #define LINE_BUFLEN 4096 -static void repl() { +static void repl(void) { sds historyfile = NULL; int history = 0; char *line; @@ -1677,7 +1677,7 @@ void bytesToHuman(char *s, long long n) { } } -static void statMode() { +static void statMode(void) { redisReply *reply; long aux, requests = 0; int i = 0; @@ -1763,7 +1763,7 @@ static void statMode() { * Scan mode *--------------------------------------------------------------------------- */ -static void scanMode() { +static void scanMode(void) { redisReply *reply; unsigned long long cur = 0; |