summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib/libc/string/test-wcscasecmp.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-07-09 18:47:51 +0000
committermarius <marius@FreeBSD.org>2011-07-09 18:47:51 +0000
commitc7a02e807c5cce0bd96e390d82ed5117c994045e (patch)
tree3b0a01a3e348bd83d12d0eb36c32dc203fcd1e83 /tools/regression/lib/libc/string/test-wcscasecmp.c
parent17591f511aadb2ec519d763bd2bac145f7022bb5 (diff)
downloadFreeBSD-src-c7a02e807c5cce0bd96e390d82ed5117c994045e.zip
FreeBSD-src-c7a02e807c5cce0bd96e390d82ed5117c994045e.tar.gz
Fix the definition for PCPU_NAME_LEN, which is intended to fit
("CPU %d", cpuid) where cpuid <= MAXCPU. 1. sizeof(__XSTRING(MAXCPU) + 1) is a typo: typeof(__XSTRING(...) + 1) is 'char *', so sizeof() will return the size of the pointer, not the size of the string contents. The proper expression should be 'sizeof(__XSTRING(MAXCPU)) + 1'. 2. One should not add one, but substract it: sizeof() accounts for the trailing '\0' and we have two sizeof's, so the size of one '\0' should be substracted -- this will give the maximal string buffer length for CPU with its number, no less, no more. Submitted by: rea
Diffstat (limited to 'tools/regression/lib/libc/string/test-wcscasecmp.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud