* the actual cloaking would get ugly
*/
for (tptr = outbuf; *tptr != '\0'; tptr++)
- {
- if (*tptr == ':') {
+ if (*tptr == ':')
totalcount++;
- }
- }
}
else if (!strchr(outbuf, '.'))
- {
return;
- }
for (tptr = outbuf; *tptr != '\0'; tptr++)
{
continue;
}
- switch (ipv6)
- {
- case 1:
- if (sepcount < totalcount / 2)
- break;
- case 0:
- if (sepcount < 2)
- break;
- default:
- *tptr = chartable[(*tptr + accum) % 20];
+ if (ipv6 && sepcount < totalcount / 2)
+ continue;
- }
+ if (!ipv6 && sepcount < 2)
+ continue;
+ *tptr = chartable[(*tptr + accum) % 20];
accum = (accum << 1) | (accum >> 31);
}
}
for (tptr = outbuf; *tptr != '\0'; tptr++)
{
if (isdigit(*tptr))
- {
- *tptr = (*tptr + accum) % 10;
- }
+ *tptr = '0' + (*tptr + accum) % 10;
accum = (accum << 1) | (accum >> 31);
}