From e337d6aba0d1a63ebd1834e1748fe1923a8cf11f Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 20 Mar 2014 12:19:38 +0000 Subject: [PATCH] avoid using min --- C/text.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C/text.c b/C/text.c index b30067b81..5ac19fab6 100644 --- a/C/text.c +++ b/C/text.c @@ -26,10 +26,11 @@ #include #ifndef HAVE_WCSNLEN -inline static min(size_t i, size_t j) { - i < j ? return i : return j; +inline static size_t +min_size(size_t i, size_t j) { + return ( i < j ? i : j ); } -#define wcsnlen(S, N) min(N, wcslen(S)) +#define wcsnlen(S, N) min_size(N, wcslen(S)) #endif static inline unsigned char *get_char(unsigned char *p, int *c) { *c = *p; return p+1; }