=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_validate.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- src/usr.bin/mandoc/mdoc_validate.c 2014/04/20 16:44:44 1.128 +++ src/usr.bin/mandoc/mdoc_validate.c 2014/04/20 19:39:35 1.129 @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.128 2014/04/20 16:44:44 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.129 2014/04/20 19:39:35 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -41,8 +41,6 @@ #define PRE_ARGS struct mdoc *mdoc, struct mdoc_node *n #define POST_ARGS struct mdoc *mdoc -#define NUMSIZ 32 - enum check_ineq { CHECK_LT, CHECK_GT, @@ -1384,7 +1382,7 @@ int i; enum mdoct tok; struct mdoc_node *n; - char buf[NUMSIZ]; + char buf[24]; n = mdoc->last; @@ -1416,7 +1414,7 @@ assert(i < (int)n->args->argc); - snprintf(buf, NUMSIZ, "%un", (unsigned int)width); + (void)snprintf(buf, sizeof(buf), "%un", (unsigned int)width); free(n->args->argv[i].value[0]); n->args->argv[i].value[0] = mandoc_strdup(buf); @@ -1431,7 +1429,7 @@ struct mdoc_node *n, *nn; size_t sz, ssz; int i; - char buf[NUMSIZ]; + char buf[24]; /* * Calculate the -width for a `Bl -tag' list if it hasn't been @@ -1466,7 +1464,7 @@ /* Defaults to ten ens. */ - snprintf(buf, NUMSIZ, "%un", (unsigned int)sz); + (void)snprintf(buf, sizeof(buf), "%un", (unsigned int)sz); /* * We have to dynamically add this to the macro's argument list.