openwrt: math.max converts int32 to float, use two > comparisons instead

This commit is contained in:
Bart Van Der Meerssche 2010-10-01 14:20:45 +02:00
parent 40ce61e4a6
commit 099e00c8f6
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ function buffer(child, interval)
prev[meter].msec = msec
end
if timestamp > math.max(1234567890, prev[meter].timestamp or 0) and value then
if timestamp > 1234567890 and timestamp > (prev[meter].timestamp or 0) and value then
measurements:add(meter, timestamp, value)
end
end