]> git.saurik.com Git - redis.git/commitdiff
initialized a few vars just to avoid warnings, not a real problem.
authorantirez <antirez@metal.(none)>
Tue, 14 Dec 2010 15:39:33 +0000 (16:39 +0100)
committerantirez <antirez@metal.(none)>
Tue, 14 Dec 2010 15:39:33 +0000 (16:39 +0100)
src/t_hash.c

index 838f29ddaae86756979fefd9fa094ccba08f3816..488bf6b7a039449137ca874dbfba50687ba256fa 100644 (file)
@@ -219,8 +219,8 @@ int hashTypeCurrent(hashTypeIterator *hi, int what, robj **objval, unsigned char
  * reference is retained. */
 robj *hashTypeCurrentObject(hashTypeIterator *hi, int what) {
     robj *obj;
  * reference is retained. */
 robj *hashTypeCurrentObject(hashTypeIterator *hi, int what) {
     robj *obj;
-    unsigned char *v;
-    unsigned int vlen;
+    unsigned char *v = NULL;
+    unsigned int vlen = 0;
     int encoding = hashTypeCurrent(hi,what,&obj,&v,&vlen);
 
     if (encoding == REDIS_ENCODING_HT) {
     int encoding = hashTypeCurrent(hi,what,&obj,&v,&vlen);
 
     if (encoding == REDIS_ENCODING_HT) {
@@ -430,8 +430,8 @@ void genericHgetallCommand(redisClient *c, int flags) {
     hi = hashTypeInitIterator(o);
     while (hashTypeNext(hi) != REDIS_ERR) {
         robj *obj;
     hi = hashTypeInitIterator(o);
     while (hashTypeNext(hi) != REDIS_ERR) {
         robj *obj;
-        unsigned char *v;
-        unsigned int vlen;
+        unsigned char *v = NULL;
+        unsigned int vlen = 0;
         int encoding;
 
         if (flags & REDIS_HASH_KEY) {
         int encoding;
 
         if (flags & REDIS_HASH_KEY) {