From ec5d0dfd89e23eced28ffe0cbecb400ab9e25eb5 Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Wed, 3 Feb 2016 21:12:46 +0100 Subject: [PATCH] Remove redundant code from port-{adsl,etherlike,poe} polling submodules. $this_port already gets defined within include/polling/ports.inc.php so there's no need to redefine it again in each submodule. Signed-off-by: Maximilian Wilhelm --- includes/polling/port-adsl.inc.php | 5 +---- includes/polling/port-etherlike.inc.php | 7 +------ includes/polling/port-poe.inc.php | 7 +------ 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/includes/polling/port-adsl.inc.php b/includes/polling/port-adsl.inc.php index 901fb6d0b..42b986428 100644 --- a/includes/polling/port-adsl.inc.php +++ b/includes/polling/port-adsl.inc.php @@ -39,10 +39,7 @@ // adslAturPerfESs.1 = 0 seconds // adslAturPerfValidIntervals.1 = 0 // adslAturPerfInvalidIntervals.1 = 0 -if (isset($port_stats[$ifIndex]['adslLineCoding'])) { - // Check to make sure Port data is cached. - $this_port = &$port_stats[$ifIndex]; - +if (isset($this_port['adslLineCoding'])) { $rrdfile = get_port_rrdfile_path ($device['hostname'], $port_id, 'adsl'); $rrd_create = ' --step 300'; diff --git a/includes/polling/port-etherlike.inc.php b/includes/polling/port-etherlike.inc.php index ea8b044c2..729990162 100644 --- a/includes/polling/port-etherlike.inc.php +++ b/includes/polling/port-etherlike.inc.php @@ -1,11 +1,6 @@