Fix: return

This commit is contained in:
IgorA100 authored and GitHub committed 2024-02-27 17:47:59 +03:00
1 parent 9200eb42e9
commit 8d342c3ac7
1 file changed
+3 -1
+3 -1
View File
@@ -85,7 +85,7 @@ sub CpuLoad {
sub ReadStat {
if (!open(STAT, '/proc/stat')) {
Error("Enable to open /proc/stat: $!");
return undef;
return undef;
}
my ($cpu_user, $cpu_nice, $cpu_sys, $cpu_idle);
while (<STAT>) {
@@ -95,6 +95,8 @@ sub ReadStat {
}
}
close STAT;
return ($cpu_user, $cpu_nice, $cpu_sys, $cpu_idle);
}
sub CpuUsage {