Skip to content

Commit bdd5ede

Browse files
committed
lib: fix missing NULL byte warning
Change short string array to string pointer to avoid having to calculate array size to fit the string. Signed-off-by: Rafael Zalamena <[email protected]>
1 parent b87acff commit bdd5ede

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/printf/vfprintf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ vbprintfrr(struct fbuf *cb_in, const char *fmt0, va_list ap)
181181
struct fbuf cb_copy, *cb;
182182
struct fmt_outpos *opos;
183183

184-
static const char xdigs_lower[16] = "0123456789abcdef";
185-
static const char xdigs_upper[16] = "0123456789ABCDEF";
184+
static const char *xdigs_lower = "0123456789abcdef";
185+
static const char *xdigs_upper = "0123456789ABCDEF";
186186

187187
/* BEWARE, these `goto error' on error. */
188188
#define PRINT(ptr, len) { \

0 commit comments

Comments
 (0)