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: <20070305161251.AE2C97FAA@paltus.tls.msk.ru>
Date:	Mon,  5 Mar 2007 19:12:51 +0300 (MSK)
From:	Michael Tokarev <mjt@....msk.ru>
To:	undisclosed-recipients:;
Subject: (trivia) remove useless typecast around `jif' variable

in fs/proc/proc_misc.c:show_stat() routine (which handles /proc/stat
file), there's a local variable named 'jif' of type unsigned long,
declared as following:

static int show_stat(struct seq_file *p, void *v)
{
        unsigned long jif;

But later on, it's explicitly casted to (unsigned long) in printf().
Remove the useless cast, to let the compiler to do the work for us
in case we'll want to use different type here (say, u64 or something).

Signed-Off-By: Michael Tokarev <mjt@....msk.ru>

--- linux-2.6.20/fs/proc/proc_misc.c.orig	2007-02-04 21:44:54.000000000 +0300
+++ linux-2.6.20/fs/proc/proc_misc.c	2007-03-05 19:06:09.000000000 +0300
@@ -521,15 +521,15 @@ static int show_stat(struct seq_file *p,
 	seq_printf(p,
 		"\nctxt %llu\n"
 		"btime %lu\n"
 		"processes %lu\n"
 		"procs_running %lu\n"
 		"procs_blocked %lu\n",
 		nr_context_switches(),
-		(unsigned long)jif,
+		jif,
 		total_forks,
 		nr_running(),
 		nr_iowait());
 
 	return 0;
 }
 
-
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