Quellcode durchsuchen

tm: fixed warning related to failure branch routing block execution

- routing blocks id are >=1, the condition was always true because the
  field in tm struct is unsigned int
- gcc warning was: comparison is always true due to limited range of data
  type
Daniel-Constantin Mierla vor 12 Jahren
Ursprung
Commit
8e644b8e1c
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      modules/tm/t_reply.c

+ 1 - 1
modules/tm/t_reply.c

@@ -1339,7 +1339,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
 		 * save of the final reply per branch */
 		Trans->uac[branch].reply = reply;
 		if (unlikely(has_tran_tmcbs( Trans, TMCB_ON_BRANCH_FAILURE_RO|TMCB_ON_BRANCH_FAILURE)
-						|| (Trans->uac[picked_branch].on_branch_failure >= 0) )) {
+						|| (Trans->uac[picked_branch].on_branch_failure) )) {
 			extra_flags=
 				((Trans->uac[branch].request.flags & F_RB_TIMEOUT)?
 							FL_TIMEOUT:0) |