* [KJ] [PATCH] Deinitialise static variables in net/core/pktgen.c
@ 2005-12-20 7:59 Jaco Kroon
2005-12-22 20:52 ` [KJ] " David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jaco Kroon @ 2005-12-20 7:59 UTC (permalink / raw)
To: netdev; +Cc: kernel-janitors, lkml
static variables should not be explicitly initialised to 0. This causes
them to be placed in .data instead of .bss. This patch de-initialises 3
static variables in net/core/pktgen.c.
There are approximately 800 more such variables in the source tree
(2.6.15rc5). If there is more interrest I'd be willing to track down the
rest of these as well and de-initialise them as well.
--- linux-2.6.15-rc5.orig/net/core/pktgen.c 2005-12-14
10:15:12.000000000 +0200
+++ linux-2.6.15-rc5/net/core/pktgen.c 2005-12-20 09:50:28.000000000 +0200
@@ -487,9 +487,9 @@
/* Module parameters, defaults. */
static int pg_count_d = 1000; /* 1000 pkts by default */
-static int pg_delay_d = 0;
-static int pg_clone_skb_d = 0;
-static int debug = 0;
+static int pg_delay_d;
+static int pg_clone_skb_d;
+static int debug;
static DECLARE_MUTEX(pktgen_sem);
static struct pktgen_thread *pktgen_threads = NULL;
--
There are 10 kinds of people in the world, those who understand binary,
and those who don't.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-22 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-20 7:59 [KJ] [PATCH] Deinitialise static variables in net/core/pktgen.c Jaco Kroon
2005-12-22 20:52 ` [KJ] " David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox