Review at  https://gerrit.osmocom.org/2993

sccp_scrc: Fix warning: uneeded constant evaulation

translate function is always present in the same file, thus we can
remove this check.

Fixes following warning:
warning: the address of ‘translate’ will always evaluate as ‘true’ [-Waddress]
    if (translate &&

As requested by Harald, leave a comment there stating that there are some
checks missing and yet to be implemented. The translate function check
was used for this purpose.

Change-Id: I48a711f3a43496e2c0c637f34f56784f765938c4
---
M src/sccp_scrc.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/2993/1

diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index 9a6a865..a4ce34c 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -348,7 +348,7 @@
                }
                /* Called address includes SSN? */
                if (called->presence & OSMO_SCCP_ADDR_T_SSN) {
-                       if (translate &&
+                       if (/* TODO: check if we are doing global translation 
&& */
                            (called->presence & OSMO_SCCP_ADDR_T_GT))
                                return scrc_translate_node_9(inst, xua, called);
                        else

-- 
To view, visit https://gerrit.osmocom.org/2993
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48a711f3a43496e2c0c637f34f56784f765938c4
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <[email protected]>

Reply via email to