public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] Documentation/accounting/getdelays.c intialize the variable before using it
@ 2009-05-20  5:14 Jaswinder Singh Rajput
  2009-05-27  6:54 ` Andrew Morton
  2009-05-27 12:17 ` Balbir Singh
  0 siblings, 2 replies; 4+ messages in thread
From: Jaswinder Singh Rajput @ 2009-05-20  5:14 UTC (permalink / raw)
  To: Ingo Molnar, Balbir Singh, Randy Dunlap, x86 maintainers, LKML,
	Andrew Morton


May be in some cases cmd_type will be used uninitialized.

Also fixes compilation warning:

   CC [M]  Documentation/DocBook/procfs_example.o
  Documentation/accounting/getdelays.c: In function ‘main’:
  Documentation/accounting/getdelays.c:249: warning: ‘cmd_type’ may be used uninitialized in this function

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 Documentation/accounting/getdelays.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index 7ea2311..36aae3b 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -246,7 +246,7 @@ void print_ioacct(struct taskstats *t)
 
 int main(int argc, char *argv[])
 {
-	int c, rc, rep_len, aggr_len, len2, cmd_type;
+	int c, rc, rep_len, aggr_len, len2, cmd_type = TASKSTATS_CMD_ATTR_UNSPEC;
 	__u16 id;
 	__u32 mypid;
 
-- 
1.6.1.1




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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20  5:14 [PATCH -tip] Documentation/accounting/getdelays.c intialize the variable before using it Jaswinder Singh Rajput
2009-05-27  6:54 ` Andrew Morton
2009-05-27  7:03   ` Jaswinder Singh Rajput
2009-05-27 12:17 ` Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox