} else if (type == 2) {
/* strip trailing whitespaces */
l = bufl;
- while (--l >= 0 && isspace(((unsigned char *)buf)[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (int)(bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
/* strip trailing whitespaces if we have not done so already */
if ((type == 2 && buf != b) || type != 2) {
l = bufl;
- while (--l >= 0 && isspace(((unsigned char *)buf)[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (int)(bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';