diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-10-19 15:39:21 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-27 11:33:44 -0500 |
commit | d47ce2ece33eac5c2b12d52622d1b17fe6a34ce9 (patch) | |
tree | 8e6a11219c23d07e46ec03e42626aa72d8226584 /net/tipc | |
parent | 64b32f7e38627a325c825087318c09075a5edc42 (diff) |
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 <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/eth_media.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 236155c67aa0..cd0a4b8b0ecf 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c | |||
@@ -371,8 +371,6 @@ int tipc_eth_media_start(void) | |||
371 | if (eth_started) | 371 | if (eth_started) |
372 | return -EINVAL; | 372 | return -EINVAL; |
373 | 373 | ||
374 | memset(eth_bearers, 0, sizeof(eth_bearers)); | ||
375 | |||
376 | res = tipc_register_media(ð_media_info); | 374 | res = tipc_register_media(ð_media_info); |
377 | if (res) | 375 | if (res) |
378 | return res; | 376 | return res; |
@@ -396,6 +394,5 @@ void tipc_eth_media_stop(void) | |||
396 | 394 | ||
397 | flush_scheduled_work(); | 395 | flush_scheduled_work(); |
398 | unregister_netdevice_notifier(¬ifier); | 396 | unregister_netdevice_notifier(¬ifier); |
399 | memset(ð_bearers, 0, sizeof(eth_bearers)); | ||
400 | eth_started = 0; | 397 | eth_started = 0; |
401 | } | 398 | } |