2
0
Эх сурвалжийг харах

Provide two useful macros for str initialization: STR_STATIC_INIT() and
STR_NULL. Adjust all modules to use those macros where appropriate.

Verified by: md5(1) (those modules, which actually compile)

Maxim Sobolev 20 жил өмнө
parent
commit
8508f5aca3

+ 1 - 1
modules/db_mysql/val.c

@@ -160,7 +160,7 @@ static inline int time2str(time_t _v, char* _s, int* _l)
  */
 int str2val(db_type_t _t, db_val_t* _v, const char* _s, int _l)
 {
-	static str dummy_string = {"", 0};
+	static str dummy_string = STR_STATIC_INIT("");
 	
 	if (!_v) {
 		LOG(L_ERR, "str2val: Invalid parameter value\n");