lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 06/16] dyndbg: fix a BUG_ON in ddebug_describe_flags
On Tue, Dec 10, 2019 at 12:58 PM Jason Baron <jbaron@akamai.com> wrote:
> >
> > +struct flagsbuf { char buf[12]; }; /* big enough to hold all the flags */
>
>
> ARRAY_SIZE(opt_array) + 1
>
> max number of flags + string termination.
>


Ok 12 is generous.
v2 had xyz flags, for a total of 9+1 flag chars.
figured a multiple of 4 was sensible, almost went to 16
then didnt think about it anymore.

\
 
 \ /
  Last update: 2019-12-13 02:36    [W:0.055 / U:5.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site