aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-23 11:11:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-23 11:11:12 +0100
commit124cd1a8573e0d8ea37a9d2239295bc347422579 (patch)
treede878c7972ba7dc658dc28219b7172171c9cce1b /src
parent40bca7aba4b2070ed2910368c4914f36b3f142cb (diff)
downloadrspamd-124cd1a8573e0d8ea37a9d2239295bc347422579.tar.gz
rspamd-124cd1a8573e0d8ea37a9d2239295bc347422579.zip
[Fix] Fix float usage in util:get_time
Issue: #1065 Reported by: @AlexeySa
Diffstat (limited to 'src')
-rw-r--r--src/libutil/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h
index 447e72324..8bee11b5f 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -203,7 +203,7 @@ void g_ptr_array_insert (GPtrArray *array, gint index_, gpointer data);
((dbl) - (int)(dbl)) * 1e9; \
} while (0)
#define tv_to_msec(tv) ((tv)->tv_sec * 1000LLU + (tv)->tv_usec / 1000LLU)
-#define tv_to_double(tv) ((tv)->tv_sec + (tv)->tv_usec / 1e6f)
+#define tv_to_double(tv) ((double)(tv)->tv_sec + (tv)->tv_usec / 1.0e6)
#define ts_to_usec(ts) ((ts)->tv_sec * 1000000LLU + \
(ts)->tv_nsec / 1000LLU)