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: <CAKYW3yYpzB3YbcM=Kk_zGK6q96sbRceH3XeXKp1w72WzNF8W8A@mail.gmail.com>
Date:	Thu, 21 Jul 2011 16:27:49 +0200
From:	Toon Schoenmakers <nighteyes1993@...il.com>
To:	Dan Carpenter <error27@...il.com>
Cc:	gregkh@...e.de, caratorn@...il.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Summary: Fixed all the indents and other errors in IEEE11h.c

I am really just beginning with C, so I don't think I can rewrite the
part that now is in Lisp (I didn't even know it was in Lisp until you
said so)
And with WLAN_SET_FC_FSTYPE() not being aligned I assume you mean that
you'd like to see it right under the thing that's above it, for easy
reading, right?
The aligning of it is probably the only thing I can fix at this point
of time, thanks for the suggestions though.

-Toon

On Mon, Jul 18, 2011 at 14:36, Dan Carpenter <error27@...il.com> wrote:
> On Sun, Jul 17, 2011 at 01:38:29AM +0200, Toon Schoenmakers wrote:
>
>> +     uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ,
>> +                     sMSRReqEIDs))/
>> +                     (sizeof(WLAN_IE_MEASURE_REQ)));
>
> It would be better to write this in C instead of Lisp:
>
>        uNumOfEIDs = (uLength - offsetof(WLAN_FRAME_MSGREQ, sMSRReqEIDS)) /
>                        sizeof(WLAN_EI_MEASURE_REQ);
>
> The other advantage of that is that the call to offsetof() is now
> all together on one line.
>
>> +     pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
>> +sizeof(STxMgmtPacket));
>> +
>> +     pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket +
>> +sizeof(STxMgmtPacket));
>> +
>
> Don't do that.
>
>> +     pFrame->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |
>> +                             WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
>> +                             );
>
> The close parenthesis can fit on the end of the other line.  In fact
> the paren is not needed at all.  Why is the second line aligned where
> you have it?  The WLAN_SET_FC_FSTYPE() isn't aligned with anything.
>
> Take a another look through the patch and you'll find a bunch of
> similar issues.
>
> regards,
> dan carpenter
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ