small logic cleanup

This commit is contained in:
inxi-svn 2014-09-17 04:16:33 +00:00
parent b1eb472b55
commit 351d4932e2

8
inxi
View file

@ -3974,13 +3974,13 @@ get_cpu_data()
# this is / was used in inxi short output only, but when it is N/A, need to use the previous array
# value, from above, the actual speed that is, for short output, key 0.
if (speed == 0) {
print "N/A"
print "N/A,0,0"
exit
}
else {
sub(/\.0[0]+$/,"",max)
sub(/\.0[0]+$/,"",speed)
sub(/\.0[0]+$/,"",min)
sub(/\.[0-9]+$/,"",max)
sub(/\.[0-9]+$/,"",speed)
sub(/\.[0-9]+$/,"",min)
print speed "," min "," max
}
}