lkml.org 
[lkml]   [2019]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags
On Wed, Apr 10, 2019 at 01:17:19PM +1000, Alastair D'Silva wrote:
> @@ -107,7 +108,7 @@ EXPORT_SYMBOL(bin2hex);
> * string if enough space had been available.
> */
> int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
> - char *linebuf, size_t linebuflen, bool ascii)
> + char *linebuf, size_t linebuflen, u64 flags)
> {
> const u8 *ptr = buf;
> int ngroups;
> @@ -184,7 +185,7 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
> if (j)
> lx--;
> }
> - if (!ascii)
> + if (!flags & HEXDUMP_ASCII)
^^^^^^^^^^^^^^^^^^^^^^
This is a precedence bug. It should be if (!(flags & HEXDUMP_ASCII)).


> goto nil;
>

regards,
dan carpenter


\
 
 \ /
  Last update: 2019-04-10 09:00    [W:0.183 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site