From d47ce2ece33eac5c2b12d52622d1b17fe6a34ce9 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Wed, 19 Oct 2011 15:39:21 -0400 Subject: tipc: Eliminate useless memset operations in Ethernet media support Gets rid of two pointless operations that zero out the array used to record information about TIPC's Ethernet bearers. There is no need to initialize the array on start up since it is a global variable that is already zero'd out, and there is no need to zero it out on exit because the array is never referenced again. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 236155c..cd0a4b8 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -371,8 +371,6 @@ int tipc_eth_media_start(void) if (eth_started) return -EINVAL; - memset(eth_bearers, 0, sizeof(eth_bearers)); - res = tipc_register_media(ð_media_info); if (res) return res; @@ -396,6 +394,5 @@ void tipc_eth_media_stop(void) flush_scheduled_work(); unregister_netdevice_notifier(¬ifier); - memset(ð_bearers, 0, sizeof(eth_bearers)); eth_started = 0; } -- cgit v0.10.2