staging/lustre: fix coccinelle warnings
authorFengguang Wu <fengguang.wu@intel.com>
Wed, 12 Feb 2014 11:21:40 +0000 (19:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2014 17:27:10 +0000 (09:27 -0800)
drivers/staging/lustre/lustre/llite/dir.c:1416:2-8: Replace memcpy with struct assignment

Generated by: coccinelle/misc/memcpy-assign.cocci

CC: Peng Tao <bergwolf@gmail.com>
CC: Andreas Dilger <andreas.dilger@intel.com>
CC: Oleg Drokin <oleg.drokin@intel.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/dir.c

index 78ee3b118787e975a66cb161b8d6bcafd1bc6255..fd0dd20e11704aad77f8ef5b0ec497a9a8e3d60d 100644 (file)
@@ -1400,7 +1400,7 @@ lmv_out_free:
                if (tmp == NULL)
                        GOTO(free_lmv, rc = -ENOMEM);
 
-               memcpy(tmp, &lum, sizeof(lum));
+               *tmp = lum;
                tmp->lum_type = LMV_STRIPE_TYPE;
                tmp->lum_stripe_count = 1;
                mdtindex = ll_get_mdt_idx(inode);