Mixing signed and unsigned quantities in MIN() upset GCC's tender soul.

This commit is contained in:
Barak A. Pearlmutter 2014-04-02 12:53:36 +01:00
parent 97d96b1504
commit 02c8718fb7

View file

@ -26,7 +26,7 @@ build_hostname(char *buf, size_t buflen,
size_t space; size_t space;
char *b; char *b;
space = MIN(maxlen, buflen) - strlen(topdomain) - 8; space = MIN((size_t)maxlen, buflen) - strlen(topdomain) - 8;
/* 8 = 5 max header length + 1 dot before topdomain + 2 safety */ /* 8 = 5 max header length + 1 dot before topdomain + 2 safety */
if (!encoder->places_dots()) if (!encoder->places_dots())