summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2009-07-28 13:49:46 +0000
committerKevin P. Fleming <kpfleming@digium.com>2009-07-28 13:49:46 +0000
commitba020fc3909c1b241358d789be991c039452749c (patch)
tree0325381f58fd6b2bc0bddffcc3e553dbd4f8ad8e /channels
parentb3090ee28a707aea02ec0dc1adc72dab66f17431 (diff)
Define side-effect-safe MIN and MAX macros and remove duplicate definitions from various files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_alsa.c3
-rw-r--r--channels/chan_console.c7
-rw-r--r--channels/chan_oss.c7
-rw-r--r--channels/chan_sip.c4
-rw-r--r--channels/chan_usbradio.c7
5 files changed, 0 insertions, 28 deletions
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index 48d718682..ffc62c8b1 100644
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -591,9 +591,6 @@ static struct ast_channel *alsa_request(const char *type, int fmt, const struct
static char *autoanswer_complete(const char *line, const char *word, int pos, int state)
{
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
switch (state) {
case 0:
if (!ast_strlen_zero(word) && !strncasecmp(word, "on", MIN(strlen(word), 2)))
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 55be76895..836895ac0 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -101,13 +101,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
*/
#define TEXT_SIZE 256
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
/*! \brief Dance, Kirby, Dance! @{ */
#define V_BEGIN " --- <(\"<) --- "
#define V_END " --- (>\")> ---\n"
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 9b2201a48..a58c4b6d4 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -229,13 +229,6 @@ END_CONFIG
#define DEV_DSP "/dev/dsp"
#endif
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
static char *config = "oss.conf"; /* default config file */
static int oss_debug;
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 4d89ae03c..6b9f39a14 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -557,10 +557,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define TRUE 1
#endif
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
/* Arguments for find_peer */
#define FINDUSERS (1 << 0)
#define FINDPEERS (1 << 1)
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c
index b8e9d70a9..dd1933483 100644
--- a/channels/chan_usbradio.c
+++ b/channels/chan_usbradio.c
@@ -351,13 +351,6 @@ END_CONFIG
#define DEV_DSP "/dev/dsp"
#endif
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
static char *config = "usbradio.conf"; /* default config file */
static char *config1 = "usbradio_tune_%s.conf"; /* tune config file */