]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FreeTDM: Silence -Wtautological-compare warnings emitted by clang
authorStefan Knoblich <stkn@openisdn.net>
Fri, 10 May 2013 12:11:37 +0000 (14:11 +0200)
committerStefan Knoblich <stkn@openisdn.net>
Fri, 10 May 2013 17:04:09 +0000 (19:04 +0200)
Fixes "warning: comparison of unsigned expression >= 0 is always true".

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c
libs/freetdm/src/ftmod/ftmod_libpri/lpwrap_pri.c
libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c

index fce91afdf290ce95a117514b357e36d1d7cb3be2..c19dd86b6a9cb8b3a6cb6398bee02eae252964aa 100644 (file)
@@ -222,10 +222,7 @@ static FIO_SIG_CONFIGURE_FUNCTION(ftdm_analog_configure_span)
                        if (!(intval = va_arg(ap, int *))) {
                                break;
                        }
-                       wait_dialtone_timeout = *intval;
-                       if (wait_dialtone_timeout < 0) {
-                               wait_dialtone_timeout = 0;
-                       }
+                       wait_dialtone_timeout = ftdm_max(0, *intval);
                        ftdm_log(FTDM_LOG_DEBUG, "Wait dial tone ms = %d\n", wait_dialtone_timeout);
                } else if (!strcasecmp(var, "enable_callerid")) {
                        if (!(val = va_arg(ap, char *))) {
index 44518a449639f3d4db1165e2310145b51441df1e..5b3d450d6c1c0e568fe2b761211d75cce6f803e1 100644 (file)
@@ -61,7 +61,7 @@ static struct lpwrap_pri_event_list LPWRAP_PRI_EVENT_LIST[LPWRAP_PRI_EVENT_MAX]
 
 const char *lpwrap_pri_event_str(lpwrap_pri_event_t event_id)
 {
-       if (event_id < 0 || event_id >= LPWRAP_PRI_EVENT_MAX)
+       if (event_id >= LPWRAP_PRI_EVENT_MAX)
                return "";
 
        return LPWRAP_PRI_EVENT_LIST[event_id].name;
index 5edf0b63bae426e5f380a35b0da7bb20d863d5d4..a2d4d388ef8d936c335c18af61b7c964578b4e6e 100644 (file)
@@ -665,7 +665,7 @@ static FIO_OPEN_FUNCTION(zt_open)
                        }
                }
 
-               if (zt_globals.eclevel >= 0) {
+               if (1) {
                        int len = zt_globals.eclevel;
                        if (len) {
                                ftdm_log(FTDM_LOG_INFO, "Setting echo cancel to %d taps for %d:%d\n", len, ftdmchan->span_id, ftdmchan->chan_id);