All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] removes unused variable from kernel/sysctl.h
@ 2009-04-16 17:52 Sukanto Ghosh
  2009-04-16 19:06 ` Jaswinder Singh Rajput
  2009-05-05 12:36 ` Jiri Kosina
  0 siblings, 2 replies; 4+ messages in thread
From: Sukanto Ghosh @ 2009-04-16 17:52 UTC (permalink / raw)
  To: trivial; +Cc: linux-kernel

This patch removes the unused variable 'val' from the
__do_proc_dointvec() function
in kernel/sysctl.h. The integer has been declared and used as 'val =
-val' and there is
no reference to it anywhere.
Although I am this doesn't affects the kernel binary because gcc
removes it, still it
might be confusing for people reading the code.


Signed-off-by: Sukanto Ghosh <sukanto.cse.iitb@gmail.com>

----

--- linux-2.6.29.1/kernel/sysctl.c.orig 2009-04-16 19:57:21.000000000 +0530
+++ linux-2.6.29.1/kernel/sysctl.c      2009-04-16 19:58:26.000000000 +0530
@@ -2198,7 +2198,7 @@ static int __do_proc_dointvec(void *tbl_
                  void *data)
 {
 #define TMPBUFLEN 21
-       int *i, vleft, first=1, neg, val;
+       int *i, vleft, first=1, neg;
        unsigned long lval;
        size_t left, len;

@@ -2251,8 +2251,6 @@ static int __do_proc_dointvec(void *tbl_
                        len = p-buf;
                        if ((len < left) && *p && !isspace(*p))
                                break;
-                       if (neg)
-                               val = -val;
                        s += len;
                        left -= len;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-05 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16 17:52 [PATCH] removes unused variable from kernel/sysctl.h Sukanto Ghosh
2009-04-16 19:06 ` Jaswinder Singh Rajput
2009-04-23  5:29   ` Sukanto Ghosh
2009-05-05 12:36 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.