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: <1202019619.1844.52.camel@brick>
Date:	Sat, 02 Feb 2008 22:20:19 -0800
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] cpuset: sparse warnings in cpuset.c

No need to redeclare p, we have finished with it at this point,
so reuse it in the for loop.

kernel/cpuset.c:824:23: warning: symbol 'p' shadows an earlier one
kernel/cpuset.c:746:21: originally declared here
kernel/cpuset.c:1272:52: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
---
 kernel/cpuset.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index cfaf641..fdbac43 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -821,7 +821,7 @@ static int update_cpumask(struct cpuset *cs, char *buf)
 	cgroup_iter_end(cgrp, &it);
 	if (heap.size) {
 		for (i = 0; i < heap.size; i++) {
-			struct task_struct *p = heap.ptrs[i];
+			p = heap.ptrs[i];
 			if (i == 0) {
 				latest_time = p->start_time;
 				latest_task = p;
@@ -1269,7 +1269,8 @@ static ssize_t cpuset_common_file_write(struct cgroup *cont,
 		return -E2BIG;
 
 	/* +1 for nul-terminator */
-	if ((buffer = kmalloc(nbytes + 1, GFP_KERNEL)) == 0)
+	buffer = kmalloc(nbytes + 1, GFP_KERNEL);
+	if (!buffer)
 		return -ENOMEM;
 
 	if (copy_from_user(buffer, userbuf, nbytes)) {
-- 
1.5.4.rc5.1138.g2602



--
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