Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-09-25 00:08:21 +0300
committerJunio C Hamano <gitster@pobox.com>2015-10-05 21:08:05 +0300
commit7ce4fb948c6d196a376a37840cb80ae95b5897ec (patch)
treea1c203a878cc886cc92ca862a42c2b6d41cdf90e /notes.c
parent34fa79a6cde56d6d428ab0d3160cb094ebad3305 (diff)
color: add color_set helper for copying raw colors
To set up default colors, we sometimes strcpy() from the default string literals into our color buffers. This isn't a bug (assuming the destination is COLOR_MAXLEN bytes), but makes it harder to audit the code for problematic strcpy calls. Let's introduce a color_set which copies under the assumption that there are COLOR_MAXLEN bytes in the destination (of course you can call it on a smaller buffer, so this isn't providing a huge amount of safety, but it's more convenient than calling xsnprintf yourself). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.c')
0 files changed, 0 insertions, 0 deletions