lkml.org 
[lkml]   [2018]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 14/17] staging: rtl8188eu: simplify null array initializations
    On Tue, Dec 18, 2018 at 07:34:48PM +0100, Michael Straube wrote:
    > Simplfy initialization of null arrays to improve readability
    > and save some lines.
    >
    > Signed-off-by: Michael Straube <straube.linux@gmail.com>
    > ---
    > drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 ++--
    > drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 ++----
    > 2 files changed, 4 insertions(+), 6 deletions(-)
    >
    > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
    > index d3d211d8eeee..2a42f80d1970 100644
    > --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
    > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
    > @@ -17,7 +17,7 @@
    > #include <mlme_osdep.h>
    > #include <recv_osdep.h>
    >
    > -static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
    > +static u8 null_addr[ETH_ALEN] = {};
    >
    > /**************************************************
    > OUI definitions for the vendor specific IE
    > @@ -5207,7 +5207,7 @@ u8 setkey_hdl(struct adapter *padapter, u8 *pbuf)
    > struct setkey_parm *pparm = (struct setkey_parm *)pbuf;
    > struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
    > struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
    > - u8 null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
    > + u8 null_sta[ETH_ALEN] = {};

    This just changed the type of the variable to a fixed size. I'm
    guessing it's ok, but it looks odd in a "cleanup patch"...

    thanks,

    greg k-h

    \
     
     \ /
      Last update: 2018-12-19 08:33    [W:4.111 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site