From 90a331fb3337ff8636593a7d7b12622abbd8ab53 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 11 Jan 2020 22:57:08 -0800 Subject: [PATCH] Fix perl warnings https://sourceforge.net/p/webadmin/bugs/5349/ --- system-status/system-status-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-status/system-status-lib.pl b/system-status/system-status-lib.pl index 85f399594..1022dade5 100755 --- a/system-status/system-status-lib.pl +++ b/system-status/system-status-lib.pl @@ -203,8 +203,8 @@ if (&foreign_check("net") && $gconfig{'os_type'} =~ /-linux$/) { my $out = &backquote_command( "ifconfig ".quotemeta($iname)." 2>/dev/null"); &reset_environment(); - my $rx = $out =~ /RX\s+bytes:\s*(\d+)/i ? $1 : undef; - my $tx = $out =~ /TX\s+bytes:\s*(\d+)/i ? $1 : undef; + my $rx = $out =~ /RX\s+bytes:\s*(\d+)/i ? $1 : 0; + my $tx = $out =~ /TX\s+bytes:\s*(\d+)/i ? $1 : 0; $rxtotal += $rx; $txtotal += $tx; }