Browse code

tm: use similar coding style for tm_xdata_replace as for tm_xdata_swap

Henning Westerholt authored on 09/08/2022 14:05:00
Showing 1 changed files
... ...
@@ -575,10 +575,7 @@ void tm_xdata_replace(tm_xdata_t *newxd, tm_xlinks_t *bakxd)
575 575
 		xavp_set_list(bakxd->xavps_list);
576 576
 		xavu_set_list(bakxd->xavus_list);
577 577
 		xavi_set_list(bakxd->xavis_list);
578
-		return;
579
-	}
580
-
581
-	if(newxd != NULL && bakxd != NULL) {
578
+	} else if(newxd != NULL && bakxd != NULL) {
582 579
 		LM_DBG("replace existing list in backup xd from new xd\n");
583 580
 		bakxd->uri_avps_from = set_avp_list(
584 581
 				AVP_TRACK_FROM | AVP_CLASS_URI, &newxd->uri_avps_from);
... ...
@@ -595,7 +592,6 @@ void tm_xdata_replace(tm_xdata_t *newxd, tm_xlinks_t *bakxd)
595 592
 		bakxd->xavps_list = xavp_set_list(&newxd->xavps_list);
596 593
 		bakxd->xavus_list = xavu_set_list(&newxd->xavus_list);
597 594
 		bakxd->xavis_list = xavi_set_list(&newxd->xavis_list);
598
-		return;
599 595
 	}
600 596
 }
601 597