From f2a2656bacf1c44e3e24a8b14893f998b79e830c Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 18 Nov 2015 19:00:13 +0100 Subject: [PATCH] sys: fmt: use standard / for division by 10, not div.h --- sys/fmt/fmt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/fmt/fmt.c b/sys/fmt/fmt.c index 1189cd41be..4ddc63f4b9 100644 --- a/sys/fmt/fmt.c +++ b/sys/fmt/fmt.c @@ -21,7 +21,6 @@ /* work around broken sys/posix/unistd.h */ ssize_t write(int fildes, const void *buf, size_t nbyte); -#include "div.h" #include "fmt.h" static const char _hex_chars[16] = "0123456789ABCDEF"; @@ -89,14 +88,14 @@ size_t fmt_u32_dec(char *out, uint32_t val) /* count needed characters */ for (uint32_t tmp = val; (tmp > 9); len++) { - tmp = div_u32_by_10(tmp); + tmp /= 10; } if (out) { char *ptr = out + len; while(val) { - *--ptr = div_u32_mod_10(val) + '0'; - val = div_u32_by_10(val); + *--ptr = (val % 10) + '0'; + val /= 10; } }