aewl

diff main.c @ 744:628c5bac7f3b

pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) - 1 is unnecessary
author Anselm R. Garbe <arg@suckless.org>
date Fri, 09 Feb 2007 14:56:19 +0100
parents 1cb9ae0a0104
children 743061dbe7f2
line diff
     1.1 --- a/main.c	Fri Feb 09 11:58:37 2007 +0100
     1.2 +++ b/main.c	Fri Feb 09 14:56:19 2007 +0100
     1.3 @@ -273,7 +273,7 @@
     1.4  				break;
     1.5  			default:
     1.6  				for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0');
     1.7 -				for(p = stext + strlen(stext) - 1; p >= stext && *p != '\n'; --p);
     1.8 +				for(; p >= stext && *p != '\n'; --p);
     1.9  				if(p > stext)
    1.10  					strncpy(stext, p + 1, sizeof stext);
    1.11  			}