diff options
Diffstat (limited to 'pit/src/utils.c')
| -rw-r--r-- | pit/src/utils.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pit/src/utils.c b/pit/src/utils.c index ac8087c..7bbad10 100644 --- a/pit/src/utils.c +++ b/pit/src/utils.c @@ -1,5 +1,7 @@ #include <lcq/pit/utils.h> +#include <stdio.h> + enum vsnprintf_mode { VSNPRINTF_MODE_NORMAL, VSNPRINTF_MODE_FLAGS, @@ -55,11 +57,7 @@ int pit_vsnprintf_helper( break; } case 'f': { - double arg = 0.0; - if (length_mod == 'l') - arg = va_arg(ap, double); - else - arg = va_arg(ap, double); + double arg = arg = va_arg(ap, double); long wholepart = (long) arg; double fracpart = arg - (double) wholepart; if (wholepart == 0) { WRITE('0') } |
