avoid using min

This commit is contained in:
Vitor Santos Costa 2014-03-20 12:19:38 +00:00
parent e6fbba4030
commit e337d6aba0

View File

@ -26,10 +26,11 @@
#include <string.h> #include <string.h>
#ifndef HAVE_WCSNLEN #ifndef HAVE_WCSNLEN
inline static min(size_t i, size_t j) { inline static size_t
i < j ? return i : return j; 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 #endif
static inline unsigned char *get_char(unsigned char *p, int *c) { *c = *p; return p+1; } static inline unsigned char *get_char(unsigned char *p, int *c) { *c = *p; return p+1; }