]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix returning of REDIS_NIL
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 Aug 2016 10:20:28 +0000 (11:20 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 Aug 2016 10:23:34 +0000 (11:23 +0100)
src/lua/lua_redis.c

index c35d9614bb058fbd615d371087144bbacb182d74..1fc8e1777469335f6ef7465db6c6ef3172510aa7 100644 (file)
@@ -271,8 +271,7 @@ lua_redis_push_reply (lua_State *L, const redisReply *r)
                lua_pushnumber (L, r->integer);
                break;
        case REDIS_REPLY_NIL:
-               /* XXX: not the best approach */
-               lua_newuserdata (L, sizeof (gpointer));
+               lua_pushnil (L);
                break;
        case REDIS_REPLY_STRING:
        case REDIS_REPLY_STATUS: