1
0

pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) - 1 is unnecessary

This commit is contained in:
Anselm R. Garbe 2007-02-09 14:56:19 +01:00
parent e5765cdd84
commit fd995dac78

2
main.c
View File

@ -273,7 +273,7 @@ main(int argc, char *argv[]) {
break; break;
default: default:
for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0'); for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0');
for(p = stext + strlen(stext) - 1; p >= stext && *p != '\n'; --p); for(; p >= stext && *p != '\n'; --p);
if(p > stext) if(p > stext)
strncpy(stext, p + 1, sizeof stext); strncpy(stext, p + 1, sizeof stext);
} }