Messages in this thread | | | Date | Thu, 13 Jul 2006 14:02:23 -0600 | From | Matthew Wilcox <> | Subject | Re: [PATCH] Support DOS line endings |
| |
On Thu, Jul 13, 2006 at 09:35:43PM +0200, Sam Ravnborg wrote: > --- a/scripts/kconfig/confdata.c > +++ b/scripts/kconfig/confdata.c > @@ -195,6 +195,8 @@ load: > p2 = strchr(p, '\n'); > if (p2) > *p2 = 0; > + if (*--p2 == '\r') > + *p2 = 0;
... but if p2 is NULL ...
so: if (p2) { *p2 = 0; if (*--p2 == '\r') *p2 = 0; }
but maybe it'd be better to do ...
if (p2) { *p2-- = 0; if (*p2 == '\r') *p2 = 0; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |