Browse Source

rr: pointer aliasing warning fixes

- use the avp data union
Andrei Pelinescu-Onciul 16 years ago
parent
commit
34dc702f61
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules_s/rr/avp_cookie.c

+ 2 - 2
modules_s/rr/avp_cookie.c

@@ -66,11 +66,11 @@ str *rr_get_avp_cookies(void) {
 
 
 			if ((avp->flags&(AVP_NAME_STR|AVP_VAL_STR)) == AVP_NAME_STR) {
 			if ((avp->flags&(AVP_NAME_STR|AVP_VAL_STR)) == AVP_NAME_STR) {
 				/* avp type str, int value */
 				/* avp type str, int value */
-				avp_name = &  ((struct str_int_data*)&avp->d.data[0])->name;
+				avp_name = &  ((struct str_int_data*)avp->d.p)->name;
 			}
 			}
 			else if ((avp->flags&(AVP_NAME_STR|AVP_VAL_STR)) == (AVP_NAME_STR|AVP_VAL_STR)) {
 			else if ((avp->flags&(AVP_NAME_STR|AVP_VAL_STR)) == (AVP_NAME_STR|AVP_VAL_STR)) {
 				/* avp type str, str value */
 				/* avp type str, str value */
-				avp_name = & ((struct str_str_data*)&avp->d.data[0])->name;
+				avp_name = & ((struct str_str_data*)avp->d.p)->name;
 			}
 			}
 			else
 			else
 				avp_name = 0;  /* dummy */
 				avp_name = 0;  /* dummy */