Răsfoiți Sursa

htable: init vars in ht_dmq_handle_sync() to avoid compile warnings

(cherry picked from commit e0256096742a1f86e571949a5ffcf5e453401977)
Daniel-Constantin Mierla 6 ani în urmă
părinte
comite
848252c1b2
1 a modificat fișierele cu 10 adăugiri și 11 ștergeri
  1. 10 11
      src/modules/htable/ht_dmq.c

+ 10 - 11
src/modules/htable/ht_dmq.c

@@ -537,17 +537,16 @@ error:
 int ht_dmq_handle_sync(srjson_doc_t* jdoc) {
 	LM_DBG("handling sync\n");
 
-	srjson_t* cells;
-	srjson_t* cell;
-	srjson_t* it;
-	str htname;
-	str cname;
-	int type;
-	int_str val;
-	int expire;
-	ht_t* ht;
-	time_t now;
-
+	srjson_t* cells = NULL;
+	srjson_t* cell = NULL;
+	srjson_t* it = NULL;
+	str htname = STR_NULL;
+	str cname = STR_NULL;
+	int type = 0;
+	int_str val = {0};
+	int expire = 0;
+	ht_t* ht = NULL;
+	time_t now = 0;
 
 	cells = jdoc->root->child;
 	cell = cells->child;