Browse Source

avpops: switched from initialize struct with {0} to memset

- apparently gcc doesn't like it although it should be the standard
- clang is ok with it
- reported by Juha Heinanen
Daniel-Constantin Mierla 11 years ago
parent
commit
f0e8c293e2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      modules/avpops/avpops_impl.c

+ 3 - 1
modules/avpops/avpops_impl.c

@@ -291,7 +291,7 @@ int ops_dbload_avps (struct sip_msg* msg, struct fis_param *sp,
 	str *s0, *s1, *s2;
 	str *s0, *s1, *s2;
 	int_str avp_name;
 	int_str avp_name;
 	int avp_type = 0;
 	int avp_type = 0;
-	pv_value_t xvalue = {0};
+	pv_value_t xvalue;
 
 
 	s0 = s1 = s2 = NULL;
 	s0 = s1 = s2 = NULL;
 	if (!((sp->opd&AVPOPS_VAL_PVAR)||(sp->opd&AVPOPS_VAL_STR))) {
 	if (!((sp->opd&AVPOPS_VAL_PVAR)||(sp->opd&AVPOPS_VAL_STR))) {
@@ -299,6 +299,8 @@ int ops_dbload_avps (struct sip_msg* msg, struct fis_param *sp,
 		goto error;
 		goto error;
 	}
 	}
 
 
+	memset(&xvalue, 0, sizeof(pv_value_t));
+
 	/* get uuid from avp */
 	/* get uuid from avp */
 	if (sp->opd&AVPOPS_VAL_PVAR)
 	if (sp->opd&AVPOPS_VAL_PVAR)
 	{
 	{