All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] chomp to remove '\r' as well
@ 2006-09-11 12:35 Mads Martin Joergensen
  2006-09-11 13:11 ` Joel Aelwyn
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Mads Martin Joergensen @ 2006-09-11 12:35 UTC (permalink / raw)
  To: mlmmj

Hey together,

Anyone object to this behaviour? Just heard on irc someone got bitten by
this:

--- chomp.c     20 Feb 2006 05:00:09 -0000      1.4
+++ chomp.c     11 Sep 2006 12:34:28 -0000
@@ -38,7 +38,7 @@

        i = strlen(str) - 1;

-       while(str[i] = '\n') {
+       while(str[i] = '\n' || str[i] = '\r') {
                str[i] = 0;
                i--;
        }

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                 -- A. P. J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-12 15:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-11 12:35 [PATCH] chomp to remove '\r' as well Mads Martin Joergensen
2006-09-11 13:11 ` Joel Aelwyn
2006-09-11 13:18 ` Mads Martin Joergensen
2006-09-11 13:25 ` Joel Aelwyn
2006-09-11 18:14 ` Morten K. Poulsen
2006-09-11 23:25 ` Mads Martin Joergensen
2006-09-12 15:50 ` Morten K. Poulsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.