commit | 30e77bcb5008d1947c721fb084e21eeaa591c45e | [log] [tgz] |
---|---|---|
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | Thu Apr 25 21:40:25 2013 +0200 |
committer | Junio C Hamano <gitster@pobox.com> | Thu Apr 25 15:02:51 2013 -0700 |
tree | 5e4cf4c72115b69ac0e96cfa2b7a6f763c41c50d | |
parent | de5abe9fe91a496d019d62abefe23df9d72fad30 [diff] |
pretty: simplify input line length calculation in pp_user_info() Instead of searching for LF and NUL with two strchr() calls use a single strchrnul() call. We don't need to check if the returned pointer is NULL because either we'll find the NUL at the end of line, or the caller forgot to NUL-terminate the string and we'll overrun the buffer in any case. Also we don't need to pass LF or NUL to split_ident_line() as it ignores it anyway. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>