Browse Source

modules/rr: initialize to NULL

Mikko Lehto 9 năm trước cách đây
mục cha
commit
c00867e50d
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  1. 1 5
      modules/rr/record.c

+ 1 - 5
modules/rr/record.c

@@ -492,7 +492,7 @@ error:
 int record_route_preset(struct sip_msg* _m, str* _data)
 {
 	str user = {NULL, 0};
-	struct to_body* from;
+	struct to_body* from = NULL;
 	struct lump* l;
 	char* hdr, *p;
 	int hdr_len;
@@ -511,10 +511,6 @@ int record_route_preset(struct sip_msg* _m, str* _data)
 		rr_prefix_len = RR_PREFIX_SIPS_LEN;
 	}
 
-	from = 0;
-	user.len = 0;
-	user.s = 0;
-
 	if (add_username) {
 		if (get_username(_m, &user) < 0) {
 			LM_ERR("failed to extract username\n");