lkml.org 
[lkml]   [2009]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [Patch] selinux: remove an unreachable line
    Dan Carpenter wrote:
    > On Tue, Dec 01, 2009 at 04:31:36PM +0800, Cong Wang wrote:
    >> Joe Perches wrote:
    >>> On Tue, 2009-12-01 at 02:41 -0500, Amerigo Wang wrote:
    >>>> This line is unreachable, remove it.
    >>> []
    >>>> diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
    >>>> index b5407f1..a2f1034 100644
    >>>> --- a/security/selinux/ss/mls.c
    >>>> +++ b/security/selinux/ss/mls.c
    >>>> @@ -544,7 +544,6 @@ int mls_compute_sid(struct context *scontext,
    >>>> default:
    >>>> return -EINVAL;
    >>>> }
    >>>> - return -EINVAL;
    >>>> }
    >>> I think it's better to remove the default case.
    >>>
    >> This is totally a personal taste, I think.
    >> Either is OK. James, any comments?
    >
    > I think the last unreachable return might also stop certain
    > versions of gcc complaining about control reaching the end of
    > a non void function.

    Hmm, aren't those version of gcc buggy? Here we have return values
    in all cases of 'switch', it shouldn't complain...



    \
     
     \ /
      Last update: 2009-12-03 09:39    [W:4.661 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site