diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-25 09:48:46 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-25 09:48:46 +0100 |
commit | 904a3183feb07da449562775f9e9ded1c3eaba8f (patch) | |
tree | 217bb8f09190bf6aed4f932b9ff44216903e5558 /src | |
parent | a683065a653c65aefc257e1a5443d81d0622cbfe (diff) | |
download | rspamd-904a3183feb07da449562775f9e9ded1c3eaba8f.tar.gz rspamd-904a3183feb07da449562775f9e9ded1c3eaba8f.zip |
Prefer double instead of long double for speed.
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/printf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/printf.c b/src/libutil/printf.c index 14e372f4e..e27bb9cdb 100644 --- a/src/libutil/printf.c +++ b/src/libutil/printf.c @@ -332,7 +332,7 @@ rspamd_vprintf_common (rspamd_printf_append_func func, gchar zero, numbuf[G_ASCII_DTOSTR_BUF_SIZE], *p, *last, c; const gchar *buf_start = fmt; gint d; - long double f, scale; + gdouble f, scale; glong written = 0, wr, slen; gint64 i64; guint64 ui64; @@ -572,10 +572,10 @@ rspamd_vprintf_common (rspamd_printf_append_func func, case 'f': case 'F': if (*fmt == 'f') { - f = (long double) va_arg (args, double); + f = (gdouble) va_arg (args, double); } else { - f = (long double) va_arg (args, long double); + f = (gdouble) va_arg (args, long double); } if (isnormal (f)) { @@ -634,10 +634,10 @@ rspamd_vprintf_common (rspamd_printf_append_func func, case 'g': case 'G': if (*fmt == 'g') { - f = (long double) va_arg (args, double); + f = (gdouble) va_arg (args, double); } else { - f = (long double) va_arg (args, long double); + f = (gdouble) va_arg (args, long double); } g_ascii_formatd (numbuf, sizeof (numbuf), "%g", (double)f); |