Do comparison before decrementing one of the operands.

Move invariant out of the conditional block.
This commit is contained in:
Mike Belopuhov 2015-01-18 17:58:53 +01:00
parent cb7c49446c
commit 4c2a775e0d

7
icb.c
View File

@ -599,11 +599,10 @@ icb_nextfield(char **buf, int notrspace)
(*buf)++;
if (*buf && **buf == ICB_M_SEP) {
**buf = '\0';
end = *buf;
(*buf)++;
} else
end = *buf;
while (notrspace && end && *(--end) == ' ' && end > start)
}
end = *buf;
while (notrspace && end && end > start && *(--end) == ' ')
*end = '\0';
return (start);
}