0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ip_cloaking: remove some unnecessary braces

This commit is contained in:
Jilles Tjoelker 2008-09-19 23:44:56 +02:00
parent 9d99a3096c
commit 5067fe0e81

View file

@ -92,16 +92,11 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
* the actual cloaking would get ugly * the actual cloaking would get ugly
*/ */
for (tptr = outbuf; *tptr != '\0'; tptr++) for (tptr = outbuf; *tptr != '\0'; tptr++)
{ if (*tptr == ':')
if (*tptr == ':') {
totalcount++; totalcount++;
}
}
} }
else if (!strchr(outbuf, '.')) else if (!strchr(outbuf, '.'))
{
return; return;
}
for (tptr = outbuf; *tptr != '\0'; tptr++) for (tptr = outbuf; *tptr != '\0'; tptr++)
{ {
@ -160,9 +155,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
for (tptr = outbuf; *tptr != '\0'; tptr++) for (tptr = outbuf; *tptr != '\0'; tptr++)
{ {
if (isdigit(*tptr)) if (isdigit(*tptr))
{
*tptr = '0' + (*tptr + accum) % 10; *tptr = '0' + (*tptr + accum) % 10;
}
accum = (accum << 1) | (accum >> 31); accum = (accum << 1) | (accum >> 31);
} }