Commit bd23ea3f authored by antirez's avatar antirez
Browse files

Minor aesthetic fixes to PR #3264.

Comment format fixed + local var modified from camel case to underscore
separators as Redis code base normally does (camel case is mostly used
for global symbols like structure names, function names, global vars,
...).
parent 2a3ee58e
...@@ -907,7 +907,7 @@ void bitfieldCommand(client *c) { ...@@ -907,7 +907,7 @@ void bitfieldCommand(client *c) {
struct bitfieldOp *ops = NULL; /* Array of ops to execute at end. */ struct bitfieldOp *ops = NULL; /* Array of ops to execute at end. */
int owtype = BFOVERFLOW_WRAP; /* Overflow type. */ int owtype = BFOVERFLOW_WRAP; /* Overflow type. */
int readonly = 1; int readonly = 1;
long highestWriteOffset = 0; long higest_write_offset = 0;
for (j = 2; j < c->argc; j++) { for (j = 2; j < c->argc; j++) {
int remargs = c->argc-j-1; /* Remaining args other than current. */ int remargs = c->argc-j-1; /* Remaining args other than current. */
...@@ -957,7 +957,7 @@ void bitfieldCommand(client *c) { ...@@ -957,7 +957,7 @@ void bitfieldCommand(client *c) {
if (opcode != BITFIELDOP_GET) { if (opcode != BITFIELDOP_GET) {
readonly = 0; readonly = 0;
highestWriteOffset = bitoffset + bits - 1; higest_write_offset = bitoffset + bits - 1;
/* INCRBY and SET require another argument. */ /* INCRBY and SET require another argument. */
if (getLongLongFromObjectOrReply(c,c->argv[j+3],&i64,NULL) != C_OK){ if (getLongLongFromObjectOrReply(c,c->argv[j+3],&i64,NULL) != C_OK){
zfree(ops); zfree(ops);
...@@ -979,15 +979,15 @@ void bitfieldCommand(client *c) { ...@@ -979,15 +979,15 @@ void bitfieldCommand(client *c) {
} }
if (readonly) { if (readonly) {
/* Lookup for read is ok if key doesn't exit, but errors /* Lookup for read is ok if key doesn't exit, but errors
* if it's not a string*/ * if it's not a string. */
o = lookupKeyRead(c->db,c->argv[1]); o = lookupKeyRead(c->db,c->argv[1]);
if (o != NULL && checkType(c,o,OBJ_STRING)) return; if (o != NULL && checkType(c,o,OBJ_STRING)) return;
} else { } else {
/* Lookup by making room up to the farest bit reached by /* Lookup by making room up to the farest bit reached by
* this operation. */ * this operation. */
if ((o = lookupStringForBitCommand(c, if ((o = lookupStringForBitCommand(c,
highestWriteOffset)) == NULL) return; higest_write_offset)) == NULL) return;
} }
addReplyMultiBulkLen(c,numops); addReplyMultiBulkLen(c,numops);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment