Avoid (x < 0) comparison for unsigned x.

Avoid (min < 0) comparison for unsigned min in malloc_conf_init().  This
bug had no practical consequences.

Reported by Pat Lynch.
This commit is contained in:
Jason Evans 2013-10-21 15:01:44 -07:00
parent 30e7cb1118
commit e2985a2381

View File

@ -521,14 +521,15 @@ malloc_conf_init(void)
"Invalid conf value", \
k, klen, v, vlen); \
} else if (clip) { \
if (um < min) \
if (min != 0 && um < min) \
o = min; \
else if (um > max) \
o = max; \
else \
o = um; \
} else { \
if (um < min || um > max) { \
if ((min != 0 && um < min) || \
um > max) { \
malloc_conf_error( \
"Out-of-range " \
"conf value", \