diff options
| -rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 5 | ||||
| -rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 3 | ||||
| -rw-r--r-- | accel-pppd/log.c | 5 | ||||
| -rw-r--r-- | accel-pppd/logs/log_pgsql.c | 3 | ||||
| -rw-r--r-- | accel-pppd/ppp/ppp_lcp.c | 5 | ||||
| -rw-r--r-- | accel-pppd/utils.h | 4 |
6 files changed, 8 insertions, 17 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index 72faab4e..0e65168d 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -24,6 +24,7 @@ #endif #include "iputils.h" +#include "utils.h" #include "connlimit.h" #include "vlan_mon.h" @@ -33,10 +34,6 @@ #define SID_MAX 65536 -#ifndef min -#define min(x,y) ((x)<(y)?(x):(y)) -#endif - struct pppoe_conn_t { struct list_head entry; struct triton_context_t ctx; diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index 2fd8cb35..72004cf8 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -47,9 +47,6 @@ #include "sstp_prot.h" #include "if_ppposeq.h" -#ifndef min -#define min(x,y) ((x) < (y) ? (x) : (y)) -#endif #ifndef max #define max(x,y) ((x) > (y) ? (x) : (y)) #endif diff --git a/accel-pppd/log.c b/accel-pppd/log.c index e4a1e6ed..7fac66df 100644 --- a/accel-pppd/log.c +++ b/accel-pppd/log.c @@ -11,15 +11,12 @@ #include "triton/mempool.h" #include "events.h" #include "ppp.h" +#include "utils.h" #include "log.h" #include "memdebug.h" -#ifndef min -#define min(x,y) ((x)<(y)?(x):(y)) -#endif - #define LOG_MSG 0 #define LOG_ERROR 1 #define LOG_WARN 2 diff --git a/accel-pppd/logs/log_pgsql.c b/accel-pppd/logs/log_pgsql.c index 99be5e64..5b3fd6ae 100644 --- a/accel-pppd/logs/log_pgsql.c +++ b/accel-pppd/logs/log_pgsql.c @@ -9,11 +9,10 @@ #include "log.h" #include "list.h" #include "ap_session.h" +#include "utils.h" #include "memdebug.h" -#define min(x,y) ((x)<(y)?(x):(y)) - static char *conf_conninfo; static int conf_queue_max = 1000; static char *conf_query; diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c index 05b6c4a6..ed085b3b 100644 --- a/accel-pppd/ppp/ppp_lcp.c +++ b/accel-pppd/ppp/ppp_lcp.c @@ -13,13 +13,10 @@ #include "ppp_lcp.h" #include "events.h" #include "iputils.h" +#include "utils.h" #include "memdebug.h" -#ifndef min -#define min(x,y) ((x)<(y)?(x):(y)) -#endif - struct recv_opt_t { struct list_head entry; diff --git a/accel-pppd/utils.h b/accel-pppd/utils.h index aad4025f..63c1db0d 100644 --- a/accel-pppd/utils.h +++ b/accel-pppd/utils.h @@ -4,6 +4,10 @@ #include <netinet/in.h> #include <stdint.h> +#ifndef min +#define min(x, y) ((x) < (y) ? (x) : (y)) +#endif + char *u_ip6str(const struct in6_addr *addr, char *buf); char *u_ip4str(const struct in_addr *addr, char *buf); |
