Messages in this thread | | | Date | Sun, 12 Jun 2011 18:51:22 -0600 | From | Jean Sacren <> | Subject | Re: [PATCH 1/1] kernel/sched.c: Fix array initialization typo |
| |
From: Andy Isaacson <adi@hexapodia.org> Date: Sun, 12 Jun 2011 16:09:01 -0700 > > It is a standard C idiom for defining array contents. If you write > int x[] = { > 1, > 2, > 3 > }; > > then when I add a fourth element to your array, I have to modify two > lines, and the diff will say > - 3 > + 3, > + 4 > }; > > whereas if you wrote "3," as the last line of the initializer, the diff > would be one line long.
I don't know how to thank you for this. Apparently the patch is bogus. > > Furthermore, spot the error in this diff: > > @@ -3,4 +3,5 @@ char *x[] = { > "quick", > "brown", > "fox" > + "jumped" > }; > > HTH, HAND, > -andy
-- Jean Sacren
| |