Skip to content

Commit a53d5db

Browse files
Consistent options variable name
1 parent 1d7f899 commit a53d5db

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

redis_commands.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ geoStoreType get_georadius_store_type(zend_string *key) {
26292629
}
26302630

26312631
/* Helper function to extract optional arguments for GEORADIUS and GEORADIUSBYMEMBER */
2632-
static int get_georadius_opts(HashTable *ht, geoOptions *o TSRMLS_DC) {
2632+
static int get_georadius_opts(HashTable *ht, geoOptions *opts TSRMLS_DC) {
26332633
ulong idx;
26342634
char *optstr;
26352635
zend_string *zkey;
@@ -2647,16 +2647,16 @@ static int get_georadius_opts(HashTable *ht, geoOptions *o TSRMLS_DC) {
26472647
if (Z_TYPE_P(optval) != IS_LONG || Z_LVAL_P(optval) <= 0) {
26482648
php_error_docref(NULL TSRMLS_CC, E_WARNING,
26492649
"COUNT must be an integer > 0!");
2650-
if (o->key) zend_string_release(o->key);
2650+
if (opts->key) zend_string_release(opts->key);
26512651
return FAILURE;
26522652
}
26532653

26542654
/* Set our count */
2655-
o->count = Z_LVAL_P(optval);
2656-
} else if (o->store == STORE_NONE) {
2657-
o->store = get_georadius_store_type(zkey);
2658-
if (o->store != STORE_NONE) {
2659-
o->key = zval_get_string(optval);
2655+
opts->count = Z_LVAL_P(optval);
2656+
} else if (opts->store == STORE_NONE) {
2657+
opts->store = get_georadius_store_type(zkey);
2658+
if (opts->store != STORE_NONE) {
2659+
opts->key = zval_get_string(optval);
26602660
}
26612661
}
26622662
} else {
@@ -2666,25 +2666,25 @@ static int get_georadius_opts(HashTable *ht, geoOptions *o TSRMLS_DC) {
26662666
optstr = Z_STRVAL_P(optval);
26672667

26682668
if (!strcasecmp(optstr, "withcoord")) {
2669-
o->withcoord = 1;
2669+
opts->withcoord = 1;
26702670
} else if (!strcasecmp(optstr, "withdist")) {
2671-
o->withdist = 1;
2671+
opts->withdist = 1;
26722672
} else if (!strcasecmp(optstr, "withhash")) {
2673-
o->withhash = 1;
2673+
opts->withhash = 1;
26742674
} else if (!strcasecmp(optstr, "asc")) {
2675-
o->sort = SORT_ASC;
2675+
opts->sort = SORT_ASC;
26762676
} else if (!strcasecmp(optstr, "desc")) {
2677-
o->sort = SORT_DESC;
2677+
opts->sort = SORT_DESC;
26782678
}
26792679
}
26802680
} ZEND_HASH_FOREACH_END();
26812681

26822682
/* STORE and STOREDIST are not compatible with the WITH* options */
2683-
if (o->key != NULL && (o->withcoord || o->withdist || o->withhash)) {
2683+
if (opts->key != NULL && (opts->withcoord || opts->withdist || opts->withhash)) {
26842684
php_error_docref(NULL TSRMLS_CC, E_WARNING,
26852685
"STORE[DIST] is not compatible with WITHCOORD, WITHDIST or WITHHASH");
26862686

2687-
if (o->key) zend_string_release(o->key);
2687+
if (opts->key) zend_string_release(opts->key);
26882688
return FAILURE;
26892689
}
26902690

0 commit comments

Comments
 (0)