[RFC PATCH 13/20] loop: remove memset in info64 to compat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Initialize the local variable info to zero at the time of declataion.
this also remove the need for the memset().

No functional change in this patch.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
 drivers/block/loop.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index bc074ad00eaf..667a3945bf39 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1759,9 +1759,8 @@ static noinline int
 loop_info64_to_compat(const struct loop_info64 *info64,
 		      struct compat_loop_info __user *arg)
 {
-	struct compat_loop_info info;
+	struct compat_loop_info info = { };
 
-	memset(&info, 0, sizeof(info));
 	info.lo_number = info64->lo_number;
 	info.lo_device = info64->lo_device;
 	info.lo_inode = info64->lo_inode;
-- 
2.22.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux