lkml.org 
[lkml]   [2016]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] libnvdimm, namespace: fix the type of name variable
On Sat, Nov 26, 2016 at 08:18:04PM +0100, Nicolas Iooss wrote:
> In create_namespace_blk(), the local variable "name" is defined as an
> array of NSLABEL_NAME_LEN pointers:
>
> char *name[NSLABEL_NAME_LEN];
>
> This variable is then used in calls to memcpy() and kmemdup() as if it
> were char[NSLABEL_NAME_LEN]. Remove the star in the variable definition
> to makes it look right.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

Yep, nice catch.

Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>

\
 
 \ /
  Last update: 2016-11-28 22:27    [W:0.074 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site