sha1_name: use strlcpy() to copy strings
commit2ce63e9fac242a70cd6d9e1325063bbb2e5091f8
authorRené Scharfe <l.s.r@web.de>
Sat, 21 Feb 2015 19:55:22 +0000 (21 20:55 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Feb 2015 20:01:38 +0000 (22 12:01 -0800)
tree3eb4d08d659499ec4781e3eb3f42c491cb9439f8
parent68d6d6eb402d7e39c89ce43ca37e6c16b941890c
sha1_name: use strlcpy() to copy strings

Use strlcpy() instead of calling strncpy() and then setting the last
byte of the target buffer to NUL explicitly.  This shortens and
simplifies the code a bit.

Signed-of-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c