Replace 1000 value with MSEC_PER_SEC macro when converting seconds to ms.
Signed-off-by: Bhanuprakash Bodireddy <[email protected]>
---
lib/util.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/util.c b/lib/util.c
index 46b5691..e2423fc 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -583,7 +583,7 @@ get_boot_time(void)
char line[128];
FILE *stream;
- cache_expiration = time_msec() + 5 * 1000;
+ cache_expiration = time_msec() + 5 * MSEC_PER_SEC;
stream = fopen(stat_file, "r");
if (!stream) {
@@ -595,7 +595,7 @@ get_boot_time(void)
while (fgets(line, sizeof line, stream)) {
long long int btime;
if (ovs_scan(line, "btime %lld", &btime)) {
- boot_time = btime * 1000;
+ boot_time = btime * MSEC_PER_SEC;
goto done;
}
}
@@ -2195,7 +2195,7 @@ xsleep(unsigned int seconds)
{
ovsrcu_quiesce_start();
#ifdef _WIN32
- Sleep(seconds * 1000);
+ Sleep(seconds * MSEC_PER_SEC);
#else
sleep(seconds);
#endif
--
2.4.11
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev