]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11785 [libteletone] Fix dead assignment in teletone_dtmf_detect
authorChris Rienzo <chris@signalwire.com>
Mon, 15 Apr 2019 20:02:47 +0000 (20:02 +0000)
committerMike Jerris <mike@signalwire.com>
Thu, 6 Jun 2019 15:25:19 +0000 (11:25 -0400)
libs/libteletone/src/libteletone_detect.c

index f25fea73ff31de4e7a6cfedafeceb181549efedf..7debc553dd1cebacb585c2ffe30e9d33294dfbdc 100644 (file)
@@ -317,11 +317,10 @@ TELETONE_API(teletone_hit_type_t) teletone_dtmf_detect (teletone_dtmf_detect_sta
        int sample;
        int best_row;
        int best_col;
-       char hit;
+       char hit = 0;
        int limit;
        teletone_hit_type_t r = 0;
 
-       hit = 0;
        for (sample = 0;  sample < samples;      sample = limit) {
                /* BLOCK_LEN is optimised to meet the DTMF specs. */
                if ((samples - sample) >= (BLOCK_LEN - dtmf_detect_state->current_sample)) {