aboutsummaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-01-25 23:11:00 -0500
committerJunio C Hamano <gitster@pobox.com>2017-01-26 10:47:20 -0800
commit97ca7ca8ba3acbc7166fb7ff40819696ed20e8c6 (patch)
tree2fc6954af8e4655cc8f6ebea3c979e0bbf1bef1c /fsck.c
parentc20d4d702f13e6bd4e4c8757989bed62a75e2cfa (diff)
downloadgit-97ca7ca8ba3acbc7166fb7ff40819696ed20e8c6.tar.gz
git-97ca7ca8ba3acbc7166fb7ff40819696ed20e8c6.tar.xz
fsck: move typename() printing to its own function
When an object has a problem, we mention its type. But we do so by feeding the result of typename() directly to fprintf(). This is potentially dangerous because typename() can return NULL for some type values (like OBJ_NONE). It's doubtful that this can be triggered in practice with the current code, so this is probably not fixing a bug. But it future-proofs us against modifications that make things like OBJ_NONE more likely (and gives future patches a central point to handle them). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.c')
0 files changed, 0 insertions, 0 deletions