diff options
author | antirez <antirez@gmail.com> | 2018-08-27 11:57:44 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-08-27 12:17:34 +0200 |
commit | abf52c7cf412e2b7fd1235cb85248d23db295b48 (patch) | |
tree | 4ceb1e1a3f4268deba0d6acd9fba5a47f6c1168c | |
parent | 66b5afdaa4bf53b66e4d09fe6c3ebbfff283d1c4 (diff) | |
download | redis-abf52c7cf412e2b7fd1235cb85248d23db295b48.tar.gz |
Better variable meaning in processCommand().
-rw-r--r-- | src/server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c index cd88d3c2f..aeb30cdf1 100644 --- a/src/server.c +++ b/src/server.c @@ -2594,14 +2594,14 @@ int processCommand(client *c) { * keys in the dataset). If there are not the only thing we can do * is returning an error. */ if (server.maxmemory) { - int retval = freeMemoryIfNeeded(); + int out_of_memory = freeMemoryIfNeeded() == C_ERR; /* freeMemoryIfNeeded may flush slave output buffers. This may result * into a slave, that may be the active client, to be freed. */ if (server.current_client == NULL) return C_ERR; /* It was impossible to free enough memory, and the command the client * is trying to execute is denied during OOM conditions? Error. */ - if ((c->cmd->flags & CMD_DENYOOM) && retval == C_ERR) { + if ((c->cmd->flags & CMD_DENYOOM) && out_of_memory) { flagTransaction(c); addReply(c, shared.oomerr); return C_OK; |