summaryrefslogtreecommitdiff
path: root/src/geo.c
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2020-08-11 20:04:54 -0700
committerGitHub <noreply@github.com>2020-08-11 20:04:54 -0700
commitf2db379fa3f6e0c0d81350fd0f29febea95df469 (patch)
tree07a32accac0b537fd5cef4c3788c7595483953ad /src/geo.c
parentddcbb628a18cbd6febc6c31e71de1a140239e8b4 (diff)
downloadredis-f2db379fa3f6e0c0d81350fd0f29febea95df469.tar.gz
Replace usage of wrongtypeerr with helper (#7633)
* Replace usage of wrongtypeerr with helper
Diffstat (limited to 'src/geo.c')
-rw-r--r--src/geo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/geo.c b/src/geo.c
index 3e5d5f606..77f07637a 100644
--- a/src/geo.c
+++ b/src/geo.c
@@ -702,7 +702,7 @@ void geohashCommand(client *c) {
/* Look up the requested zset */
robj *zobj = lookupKeyRead(c->db, c->argv[1]);
- if (zobj && checkType(c, zobj, OBJ_ZSET)) return;
+ if (checkType(c, zobj, OBJ_ZSET)) return;
/* Geohash elements one after the other, using a null bulk reply for
* missing elements. */
@@ -763,7 +763,7 @@ void geoposCommand(client *c) {
/* Look up the requested zset */
robj *zobj = lookupKeyRead(c->db, c->argv[1]);
- if (zobj && checkType(c, zobj, OBJ_ZSET)) return;
+ if (checkType(c, zobj, OBJ_ZSET)) return;
/* Report elements one after the other, using a null bulk reply for
* missing elements. */