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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <476b0f0-2b9-a9c1-f5c-67d6b6158d0@inria.fr>
Date:   Thu, 20 Oct 2022 13:59:12 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Tanju Brunostar <tanjubrunostar0@...il.com>
cc:     Greg KH <gregkh@...uxfoundation.org>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        outreachy@...ts.linux.dev
Subject: Re: Request for assistance



On Thu, 20 Oct 2022, Tanju Brunostar wrote:

> On Thu, Oct 20, 2022 at 12:10 PM Greg KH <gregkh@...uxfoundation.org> wrote:
> >
> > On Thu, Oct 20, 2022 at 11:00:59AM +0000, Ubuntu wrote:
> > > Hello,
> > > I have a diffictly deciding where exactly to split a long line of code. for example, this line of code is too long
> > >
> > > uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate);
> > >
> > > if i spit it this way:
> > > uCTSTime =
> > >         bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate);
> > >
> > > It does not help as the second line is still too long. I considered doing it this way instead:
> > > uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
> > >                                 pDevice->byTopCCKBasicRate);
> > > But i did this on one of my patches and i was told it is not advisable to split a line between
> > > parenthesis '(' and ')'
> >
> > Who told you that?

I did, but the context was different.  It's fine to have a newline among
the of arguments of a function call.  It's less desirable to put a newline
in the middle of (A | B), it if can be avoided.

julia

> >
> > You are close, the code should look like:
> >         uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
> >                                      pDevice->byTopCCKBasicRate);
> >
> > Like millions of other lines in the kernel source tree.  When in doubt,
> > look at existing implementations.
> >
> > hope this helps,
> >
> > greg k-h
> Thank you for the clarification
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ