diff options
author | Phil Sutter <phil@nwl.cc> | 2019-11-12 19:28:37 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2019-11-12 23:00:59 +0100 |
commit | ead5aaf4fed074f126ab1b32536e234bf6bf2276 (patch) | |
tree | 312fa01940108302bf3882ecffdb51ff9649b48a /tests | |
parent | 332325e3c3fab4c25bb5f387f9663205f63748dc (diff) |
meta: Rewrite hour_type_print()
There was no point in this recursively called __hour_type_print_r() at
all, it takes only four lines of code to split the number of seconds
into hours, minutes and seconds.
While being at it, inverse the conditional to reduce indenting for the
largest part of the function's body. Also introduce SECONDS_PER_DAY
macro to avoid magic numbers.
Fixes: f8f32deda31df ("meta: Introduce new conditions 'time', 'day' and 'hour'")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions