GCC 6 warns about potentially misleading indentation, such as:
if (condition) stmt1; stmt2;
Chaining multiple ifs on a single line runs into this warning, even if
it's probably not actually misleading to a human eye, so just add a
couple of newlines to pacify the compiler.
chapbuf[5] = '\x02'; /* Second attribute - username */
ulen = strlen(username);
chapbuf[5] = '\x02'; /* Second attribute - username */
ulen = strlen(username);
- if (ulen > 255) ulen = 255; if (ulen < 1) ulen = 1;
+ if (ulen > 255) ulen = 255;
+ if (ulen < 1) ulen = 1;
chapbuf[6] = ulen;
memcpy(chapbuf+7, username, ulen);
chapbuf[6] = ulen;
memcpy(chapbuf+7, username, ulen);
char userpwbuf[255 + 255 + 3];
int ulen, plen;
ulen = strlen(username);
char userpwbuf[255 + 255 + 3];
int ulen, plen;
ulen = strlen(username);
- if (ulen > 255) ulen = 255; if (ulen < 1) ulen = 1;
+ if (ulen > 255) ulen = 255;
+ if (ulen < 1) ulen = 1;
- if (plen > 255) plen = 255; if (plen < 1) plen = 1;
+ if (plen > 255) plen = 255;
+ if (plen < 1) plen = 1;
userpwbuf[0] = 1; /* version number of subnegotiation */
userpwbuf[1] = ulen;
memcpy(userpwbuf+2, username, ulen);
userpwbuf[0] = 1; /* version number of subnegotiation */
userpwbuf[1] = ulen;
memcpy(userpwbuf+2, username, ulen);