lkml.org 
[lkml]   [2010]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromJoe Perches <>
Subject[PATCH 2/3] drivers/isdn/mISDN/dsp_ecdis.h: Remove #define TRUE/FALSE, use bool
DateTue, 12 Jan 2010 22:59:14 -0800
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/isdn/mISDN/dsp_ecdis.h | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/isdn/mISDN/dsp_ecdis.h b/drivers/isdn/mISDN/dsp_ecdis.h
index 21dbd15..4a927b3 100644
--- a/drivers/isdn/mISDN/dsp_ecdis.h
+++ b/drivers/isdn/mISDN/dsp_ecdis.h
@@ -33,16 +33,12 @@ struct ec_disable_detector_state {
struct biquad2_state notch;
int notch_level;
int channel_level;
- int tone_present;
+ bool tone_present;
+ bool hit;
int tone_cycle_duration;
int good_cycles;
- int hit;
};

-
-#define FALSE 0
-#define TRUE (!FALSE)
-
static inline void
echo_can_disable_detector_init(struct ec_disable_detector_state *det)
{
@@ -58,10 +54,10 @@ echo_can_disable_detector_init(struct ec_disable_detector_state *det)

det->channel_level = 0;
det->notch_level = 0;
- det->tone_present = FALSE;
+ det->tone_present = false;
+ det->hit = false;
det->tone_cycle_duration = 0;
det->good_cycles = 0;
- det->hit = 0;
}
/*- End of function --------------------------------------------------------*/

@@ -91,16 +87,16 @@ int16_t amp)
&& det->tone_cycle_duration <= 475*8) {
det->good_cycles++;
if (det->good_cycles > 2)
- det->hit = TRUE;
+ det->hit = true;
}
det->tone_cycle_duration = 0;
}
- det->tone_present = TRUE;
+ det->tone_present = true;
} else
- det->tone_present = FALSE;
+ det->tone_present = false;
det->tone_cycle_duration++;
} else {
- det->tone_present = FALSE;
+ det->tone_present = false;
det->tone_cycle_duration = 0;
det->good_cycles = 0;
}
--
1.6.6.rc0.57.gad7a


\
 
 \ /
  Last update: 2010-01-13 08:01    [from the cache]
©2003-2010