locale: fix the powerpc build

Reported by:	markj (and bde, in a way)
MFC after:	3 days
X-MFC with:	r309364
Sponsored by:	Dell EMC
This commit is contained in:
vangyzen 2016-12-06 15:42:18 +00:00
parent 3eceb86920
commit cf7412f843

View File

@ -500,8 +500,10 @@ format_grouping(const char *binary)
rval[0] = '\0';
roff = 0;
for (cp = binary; *cp != '\0'; ++cp) {
#if CHAR_MIN != 0
if (*cp < 0)
break; /* garbage input */
#endif
len = snprintf(&rval[roff], sizeof(rval) - roff, "%u;", *cp);
if (len < 0 || (unsigned)len >= sizeof(rval) - roff)
break; /* insufficient space for output */