diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-05-18 11:28:57 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-05-18 11:29:21 -0400 |
commit | 796e384cae90e5ef5e14ba9aed907a5aaed1999d (patch) | |
tree | 0b320f7c4e1755a1a84a90795d64397c05aa42a3 /src/bar.c | |
parent | a2fd2dab3c1eb1f64554a4daee96fb92a3c831dd (diff) | |
download | bfs-796e384cae90e5ef5e14ba9aed907a5aaed1999d.tar.xz |
bar: Use USHRT_WIDTH
Diffstat (limited to 'src/bar.c')
-rw-r--r-- | src/bar.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,11 +3,11 @@ #include "bar.h" #include "bfstd.h" +#include "bit.h" #include "config.h" #include "dstring.h" #include <errno.h> #include <fcntl.h> -#include <limits.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> @@ -49,7 +49,7 @@ static int ass_puts(int fd, const char *str) { } /** Number of decimal digits needed for terminal sizes. */ -#define ITOA_DIGITS ((sizeof(unsigned short) * CHAR_BIT + 2) / 3) +#define ITOA_DIGITS ((USHRT_WIDTH + 2) / 3) /** Async Signal Safe itoa(). */ static char *ass_itoa(char *str, unsigned int n) { |