Messages in this thread | | | From | André Goddard Rosa <> | Date | Sun, 15 Nov 2009 04:19:04 -0200 | Subject | Re: [PATCH v4 12/12] tree-wide: convert open calls to remove spaces to skip_spaces() lib function |
| |
[stripped very long cc: line]
On Sun, Nov 8, 2009 at 6:23 PM, Julia Lawall <julia@diku.dk> wrote: >> > Also, while at it, if we see (*str && isspace(*str)), we can be sure to >> > remove the first condition (*str) as the second one (isspace(*str)) also >> > evaluates to 0 whenever *str == 0, making it redundant. In other words, >> > "a char equals zero is never a space". > > I tried the following semantic patch (http://coccinelle.lip6.fr), and got > the results below. > > @@ > expression str; > @@ > > ( // ignore skip_spaces cases > while (*str && isspace(*str)) { \(str++;\|++str;\) } > | > - *str && > isspace(*str) > ) > > I haven't checked the results in any way, however. > > julia >
Hi, Julia!
Your patch looks good, but it conflicted at the following files when I tried to apply it:
> diff -u -p a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c > diff -u -p a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c
That's because I had changed them as well. The other ones you spotted I haven't seen originally:
> diff -u -p a/drivers/leds/led-class.c b/drivers/leds/led-class.c > diff -u -p a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c > diff -u -p a/drivers/video/output.c b/drivers/video/output.c
Do you mind sending another patch or do you want me folding these in?
Thank you, André -- 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/
| |