>From fec33196fb5253e291ab16c005178599f575ae84 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 9 Jul 2018 14:21:33 +0200 Subject: [PATCH] maint: use gnulib's intprops module to avoid magic numbers * find/ftsfind.c (get_fts_info_name): Use the INT_BUFSIZE_BOUND macro to calculate the size of BUF. --- find/ftsfind.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/find/ftsfind.c b/find/ftsfind.c index 57804950..39fdfbff 100644 --- a/find/ftsfind.c +++ b/find/ftsfind.c @@ -42,6 +42,7 @@ #include "closeout.h" #include "error.h" #include "fts_.h" +#include "intprops.h" #include "progname.h" #include "quotearg.h" #include "save-cwd.h" @@ -143,7 +144,7 @@ static void init_mounted_dev_list (void); static const char * get_fts_info_name (int info) { - static char buf[14]; + static char buf[1 + INT_BUFSIZE_BOUND (info) + 1]; switch (info) { HANDLECASE(FTS_D); -- 2.18.0