Commit fd19c02d authored by jehan's avatar jehan
Browse files

allow NULL value for parser string paramaters

parent ef4cf204
......@@ -279,8 +279,10 @@ char *belle_sip_strdup_printf(const char *fmt,...);
}\
void object_type##_set_##attribute (object_type##_t* obj,const char* value) {\
if (obj->attribute != NULL) free((void*)obj->attribute);\
obj->attribute=malloc(strlen(value)+1);\
strcpy((char*)(obj->attribute),value);\
if (value) {\
obj->attribute=malloc(strlen(value)+1);\
strcpy((char*)(obj->attribute),value);\
} else obj->attribute=NULL;\
}
#define GET_SET_STRING_PARAM(object_type,attribute) GET_SET_STRING_PARAM2(object_type,attribute,attribute)
#define GET_SET_STRING_PARAM2(object_type,attribute,func_name) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment