lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1612201134290.3436@nanos>
Date:   Tue, 20 Dec 2016 11:36:58 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Ozgur Karatas <okaratas@...ber.fsf.org>
cc:     "dave@...olabs.net" <dave@...olabs.net>,
        "dvhart@...ux.intel.com" <dvhart@...ux.intel.com>,
        "bigeasy@...utronix.de" <bigeasy@...utronix.de>,
        "mgorman@...e.de" <mgorman@...e.de>,
        "dingel@...ux.vnet.ibm.com" <dingel@...ux.vnet.ibm.com>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/1] kernel: futex: fixed to else and initcall

On Tue, 20 Dec 2016, Ozgur Karatas wrote:
> 20.12.2016, 11:21, "Thomas Gleixner" <tglx@...utronix.de>:
> > On Mon, 19 Dec 2016, Ozgur Karatas wrote:
> >
> >>  else doesn't need to be used, if should be enclosed in parentheses.
> >
> > Really?
> >
> >
> > So you change the code from
> >
> >         if (err < 0)
> >                 return err;
> >             else
> >                 err = 0;
> >
> > to
> >
> >         if (err < 0) {
> >                 return err;
> >                 err = 0;
> >         }
> >
> > How on earth is that equivivalent and how would that 'err = 0;' statement
> > be ever executed?
> 
> Oh my god, I missed this point, sorry! 
> Thank you so much for correct me.
> 
> This "return err;" will give to "err" and err defined to err = "0".
> Then removed to "else" and return = err;  and should it be like this?
> 
> #define err = 0;
> 
>          if (err < 0) {
>                  return err;
>          }

I seriously recommend to take a basic C course first before trying to
change code in the kernel.

Thanks,

	tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ