ftmod_libpri: Drop custom MIN() macro and use common ftdm_min()

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
Stefan Knoblich 2012-07-25 16:07:39 +02:00
parent e71bacb2f5
commit c3d13d5e00
1 changed files with 1 additions and 5 deletions

View File

@ -34,10 +34,6 @@
#include "private/ftdm_core.h"
#include "ftmod_libpri.h"
#ifndef MIN
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#endif
static ftdm_status_t ftdm_libpri_start(ftdm_span_t *span);
static ftdm_io_interface_t ftdm_libpri_interface;
@ -1236,7 +1232,7 @@ static int on_info(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_event
if (!ftdm_strlen_zero(pevent->ring.callednum)) {
int digits = strlen(pevent->ring.callednum);
int offset = strlen(caller_data->dnis.digits);
int len = MIN(sizeof(caller_data->dnis.digits) - 1 - offset, digits); /* max. length without terminator */
int len = ftdm_min(sizeof(caller_data->dnis.digits) - 1 - offset, digits); /* max. length without terminator */
if (len < digits) {
ftdm_log_chan(chan, FTDM_LOG_WARNING, "Length %d of digit string exceeds available space %d of DNIS, truncating!\n",