summaryrefslogtreecommitdiffstats
path: root/src/bar.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-05-18 11:28:57 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-05-18 11:29:21 -0400
commit796e384cae90e5ef5e14ba9aed907a5aaed1999d (patch)
tree0b320f7c4e1755a1a84a90795d64397c05aa42a3 /src/bar.c
parenta2fd2dab3c1eb1f64554a4daee96fb92a3c831dd (diff)
downloadbfs-796e384cae90e5ef5e14ba9aed907a5aaed1999d.tar.xz
bar: Use USHRT_WIDTH
Diffstat (limited to 'src/bar.c')
-rw-r--r--src/bar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bar.c b/src/bar.c
index bd5d381..d2c663c 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -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) {