cbadf0ee37
In general, using a bare snprintf can truncate the resulting buffer, leading to confusing results. In this case we know that our buffer is sized large enough to accommodate our loop, so there's no bug. However, we should use xsnprintf() to document (and check) that assumption, and to model good practice to people reading the code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
test-chmtime.c | ||
test-config.c | ||
test-ctype.c | ||
test-date.c | ||
test-delta.c | ||
test-dump-cache-tree.c | ||
test-dump-split-index.c | ||
test-dump-untracked-cache.c | ||
test-fake-ssh.c | ||
test-genrandom.c | ||
test-hashmap.c | ||
test-index-version.c | ||
test-lazy-init-name-hash.c | ||
test-line-buffer.c | ||
test-match-trees.c | ||
test-mergesort.c | ||
test-mktemp.c | ||
test-online-cpus.c | ||
test-parse-options.c | ||
test-path-utils.c | ||
test-prio-queue.c | ||
test-read-cache.c | ||
test-ref-store.c | ||
test-regex.c | ||
test-revision-walking.c | ||
test-run-command.c | ||
test-scrap-cache-tree.c | ||
test-sha1-array.c | ||
test-sha1.c | ||
test-sha1.sh | ||
test-sigchain.c | ||
test-strcmp-offset.c | ||
test-string-list.c | ||
test-submodule-config.c | ||
test-subprocess.c | ||
test-svn-fe.c | ||
test-urlmatch-normalization.c | ||
test-wildmatch.c | ||
test-write-cache.c |