summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHrvoje Zeba <zeba.hrvoje@gmail.com>2019-11-04 19:42:48 -0700
committerJens Axboe <axboe@kernel.dk>2019-11-04 19:42:48 -0700
commit46e870e97654fdb5470c8c92c1aed1fb8ff4c103 (patch)
treef4b4e740aa2c7fc712a4aa02d5026e394d487341
parentb141467de43825d7c36f97183cbbd2db487346f8 (diff)
downloadliburing-46e870e97654fdb5470c8c92c1aed1fb8ff4c103.tar.gz
liburing-46e870e97654fdb5470c8c92c1aed1fb8ff4c103.tar.bz2
Use msec parameter instead of TIMEOUT_MSEC in msec_to_ts()
Small fix to make sure correct ts structure is filled with correct values. Signed-off-by: Hrvoje Zeba <zeba.hrvoje@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/timeout-overflow.c2
-rw-r--r--test/timeout.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/timeout-overflow.c b/test/timeout-overflow.c
index 6445225..5d275e6 100644
--- a/test/timeout-overflow.c
+++ b/test/timeout-overflow.c
@@ -14,7 +14,7 @@ static int not_supported;
static void msec_to_ts(struct __kernel_timespec *ts, unsigned int msec)
{
- ts->tv_sec = TIMEOUT_MSEC / 1000;
+ ts->tv_sec = msec / 1000;
ts->tv_nsec = (msec % 1000) * 1000000;
}
diff --git a/test/timeout.c b/test/timeout.c
index ac76789..ace17f1 100644
--- a/test/timeout.c
+++ b/test/timeout.c
@@ -18,7 +18,7 @@ static int no_modify;
static void msec_to_ts(struct __kernel_timespec *ts, unsigned int msec)
{
- ts->tv_sec = TIMEOUT_MSEC / 1000;
+ ts->tv_sec = msec / 1000;
ts->tv_nsec = (msec % 1000) * 1000000;
}