mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
util_time: zpcimon: Use a constant for seconds per day
Replace the magic value 86400 with a new util_time.h constant SEC_PER_DAY. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
2c63c69af4
commit
f9ef8a0106
@@ -19,6 +19,8 @@
|
||||
|
||||
#define MSEC_PER_SEC 1000L
|
||||
|
||||
#define SEC_PER_DAY (24 * 60 * 60)
|
||||
|
||||
/**
|
||||
* Convert nanoseconds to microseconds
|
||||
*
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "lib/util_opt.h"
|
||||
#include "lib/util_fmt.h"
|
||||
#include "lib/util_libc.h"
|
||||
#include "lib/util_time.h"
|
||||
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@@ -102,7 +103,7 @@ static void parse_cmdline(int argc, char *argv[], struct options *opts)
|
||||
optarg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (seconds < 86400)
|
||||
if (seconds < SEC_PER_DAY)
|
||||
opts->interval_seconds = seconds;
|
||||
if (seconds < 1)
|
||||
opts->interval_seconds = 1;
|
||||
|
||||
Reference in New Issue
Block a user