Parcourir la source

- db_res_t* variables initialized to NULL (patch by Norman Brandinger)

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1063 689a6050-402a-0410-94f2-e92a70836424
Daniel-Constantin Mierla il y a 19 ans
Parent
commit
f3076ee8ef
3 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 1
      lib/srdb1/db.c
  2. 1 1
      lib/srdb1/db_fifo.c
  3. 1 1
      lib/srdb1/example/dbexample.c

+ 1 - 1
lib/srdb1/db.c

@@ -158,7 +158,7 @@ int table_version(db_func_t* dbf, db_con_t* connection, const str* table)
 {
 	db_key_t key[1], col[1];
 	db_val_t val[1];
-	db_res_t* res = 0;
+	db_res_t* res = NULL;
 	db_val_t* ver = 0;
 	int ret;
 

+ 1 - 1
lib/srdb1/db_fifo.c

@@ -600,7 +600,7 @@ int db_fifo( FILE *fifo, char *response_file )
 	static db_key_t keys2[MAX_ARRAY];
 	static db_op_t  ops2[MAX_ARRAY];
 	static db_val_t vals2[MAX_ARRAY];
-	static db_res_t *select_res;
+	static db_res_t *select_res = NULL;
 	str   line;
 	int   db_cmd;
 	int   nr1, nr2;

+ 1 - 1
lib/srdb1/example/dbexample.c

@@ -167,7 +167,7 @@ struct module_exports* mod_register()
 	};
 
 	db_con_t* h;
-	db_res_t* res;
+	db_res_t* res = NULL;
 
 	fprintf(stderr, "DBExample - registering...\n");