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: <CAOMdWSK=JOQkS+nce+1YXZQFoYE5OgJTb2QuoWN_iP8tHvE3Pw@mail.gmail.com>
Date:   Fri, 8 Feb 2019 16:35:42 +0530
From:   Allen <allen.lkml@...il.com>
To:     Heiko Carstens <heiko.carstens@...ibm.com>
Cc:     linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Use ARRAY_SIZE instead of dividing sizeof array with
 sizeof an element.

> >
> > diff --git a/arch/s390/tools/gen_opcode_table.c b/arch/s390/tools/gen_opcode_table.c
> > index a1bc02b29c81..468b70c85f62 100644
> > --- a/arch/s390/tools/gen_opcode_table.c
> > +++ b/arch/s390/tools/gen_opcode_table.c
> > @@ -138,7 +138,7 @@ static struct insn_type *insn_format_to_type(char *format)
> >       strcpy(tmp, format);
> >       base_format = tmp;
> >       base_format = strsep(&base_format, "_");
> > -     for (i = 0; i < sizeof(insn_type_table) / sizeof(insn_type_table[0]); i++) {
> > +     for (i = 0; i < ARRAY_SIZE(insn_type_table); i++) {
>
> This does not compile.
>
   Surprising. I try it out again.

Thanks.

-- 
       - Allen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ