13 May, 2010

1 commit

  • This patch removes from net/ netfilter files
    all the unnecessary return; statements that precede the
    last closing brace of void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    Signed-off-by: Joe Perches
    [Patrick: changed to keep return statements in otherwise empty function bodies]
    Signed-off-by: Patrick McHardy

    Joe Perches
     

12 May, 2010

2 commits


25 Mar, 2010

4 commits

  • When extended status codes are available, such as ENOMEM on failed
    allocations, or subsequent functions (e.g. nf_ct_get_l3proto), passing
    them up to userspace seems like a good idea compared to just always
    EINVAL.

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt
     
  • The following semantic patch does part of the transformation:
    //
    @ rule1 @
    struct xt_match ops;
    identifier check;
    @@
    ops.checkentry = check;

    @@
    identifier rule1.check;
    @@
    check(...) { }

    @@
    identifier rule1.check;
    @@
    check(...) { }
    //

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt
     
  • Restore function signatures from bool to int so that we can report
    memory allocation failures or similar using -ENOMEM rather than
    always having to pass -EINVAL back.

    This semantic patch may not be too precise (checking for functions
    that use xt_mtchk_param rather than functions referenced by
    xt_match.checkentry), but reviewed, it produced the intended result.

    //
    @@
    type bool;
    identifier check, par;
    @@
    -bool check
    +int check
    (struct xt_mtchk_param *par) { ... }
    //

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt
     
  • Supplement to 1159683ef48469de71dc26f0ee1a9c30d131cf89.

    Downgrade the log level to INFO for most checkentry messages as they
    are, IMO, just an extra information to the -EINVAL code that is
    returned as part of a parameter "constraint violation". Leave errors
    to real errors, such as being unable to create a LED trigger.

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt
     

17 Mar, 2010

1 commit


13 Jan, 2009

1 commit


08 Oct, 2008

4 commits


23 Sep, 2008

1 commit

  • The function localtime_3 in xt_time.c gives a wrong monthday in a leap
    year after 28th 2. calculating monthday should use the array
    days_since_leapyear[] not days_since_year[] in a leap year.

    Signed-off-by: Kaihui Luo
    Acked-by: Jan Engelhardt
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Kaihui Luo
     

22 Jul, 2008

1 commit