lkml.org 
[lkml]   [2011]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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


    \
     
     \ /
      Last update: 2011-06-13 02:55    [W:0.019 / U:64.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site