Sfoglia il codice sorgente

modules/ims_icscf: use INT_MAX instead of MAXINT

Mikko Lehto 9 anni fa
parent
commit
5ac088f705

+ 1 - 4
modules/ims_icscf/cxdx_lir.c

@@ -51,9 +51,6 @@
 #include "mod.h"
 #include "location.h"
 
-#include "limits.h"
-#define MAXINT INT_MAX
-
 //we use pseudo variables to communicate back to config file this takes the result and converys to a return code, publishes it a pseudo variable
 int create_lia_return_code(int result) {
     int rc;
@@ -181,7 +178,7 @@ void async_cdp_lir_callback(int is_timeout, void *param, AAAMessage *lia, long e
 
 success:
     if (server_name.len) {
-        list = new_scscf_entry(server_name, MAXINT, data->orig);
+        list = new_scscf_entry(server_name, INT_MAX, data->orig);
     } else {
         list = I_get_capab_ordered(server_name, m_capab, m_capab_cnt, o_capab, o_capab_cnt, p_server_names, p_server_names_cnt, data->orig);
     }

+ 2 - 2
modules/ims_icscf/scscf_list.c

@@ -183,10 +183,10 @@ scscf_entry* I_get_capab_ordered(str scscf_name, int *m, int mcnt, int *o, int o
     scscf_entry *list = 0;
     int i, r;
 
-    if (scscf_name.len) list = I_add_to_scscf_list(list, scscf_name, MAXINT, orig);
+    if (scscf_name.len) list = I_add_to_scscf_list(list, scscf_name, INT_MAX, orig);
 
     for (i = 0; i < pcnt; i++)
-        list = I_add_to_scscf_list(list, p[i], MAXINT - i, orig);
+        list = I_add_to_scscf_list(list, p[i], INT_MAX - i, orig);
 
     for (i = 0; i < SCSCF_Capabilities_cnt; i++) {
         r = I_get_capab_match(SCSCF_Capabilities + i, m, mcnt, o, ocnt);

+ 0 - 5
modules/ims_icscf/scscf_list.h

@@ -56,11 +56,6 @@
 
 #include "../../timer.h"
 
-#ifndef MAXINT
-#define MAXINT INT_MAX
-#endif
-
-
 /** S-CSCF list element */ 
 typedef struct _scscf_entry {
 	str scscf_name;	/**< SIP URI of the S-CSCF */