]> git.ipfire.org Git - thirdparty/git.git/commit - match-trees.c
use strchrnul() in place of strchr() and strlen()
authorRohit Mani <rohit.mani@outlook.com>
Sat, 8 Mar 2014 06:48:31 +0000 (22:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Mar 2014 15:35:30 +0000 (08:35 -0700)
commit2c5495f7b60d6ddcd6a411b48d2f6dbc4a24717a
tree9900454e2b547e2fee8e9e67b39ced68ea0c650e
parent5f95c9f850b19b368c43ae399cc831b17a26a5ac
use strchrnul() in place of strchr() and strlen()

Avoid scanning strings twice, once with strchr() and then with
strlen(), by using strchrnul().

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rohit Mani <rohit.mani@outlook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c
cache-tree.c
diff.c
fast-import.c
match-trees.c
parse-options.c
pretty.c
remote-testsvn.c
ws.c