lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420467937-6435-1-git-send-email-gvercoutere@gmail.com>
Date:	Mon,  5 Jan 2015 15:25:37 +0100
From:	Guillaume Vercoutere <gvercoutere@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	gvercoutere@...il.com
Subject: [PATCH 3/3] staging: android: struct sizeof coding style in logger.c

Replace sizeof struct

Signed-off-by: Guillaume Vercoutere <gvercoutere@...il.com>
---
 drivers/staging/android/logger.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 72b804e..7e0eab2 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -512,7 +512,7 @@ static int logger_open(struct inode *inode, struct file *file)
 	if (file->f_mode & FMODE_READ) {
 		struct logger_reader *reader;
 
-		reader = kmalloc(sizeof(struct logger_reader), GFP_KERNEL);
+		reader = kmalloc(sizeof(*reader), GFP_KERNEL);
 		if (!reader)
 			return -ENOMEM;
 
@@ -710,7 +710,7 @@ static int __init create_log(char *log_name, int size)
 	if (!buffer)
 		return -ENOMEM;
 
-	log = kzalloc(sizeof(struct logger_log), GFP_KERNEL);
+	log = kzalloc(sizeof(*log), GFP_KERNEL);
 	if (!log) {
 		ret = -ENOMEM;
 		goto out_free_buffer;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ