use strpbrk(3) to search for characters from a given set
commit2ce6d075fa35e4ea4a581c809eca3ad5631c9079
authorRené Scharfe <l.s.r@web.de>
Sat, 22 Feb 2020 18:51:19 +0000 (22 19:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 17:30:31 +0000 (24 09:30 -0800)
tree163d09de764ab4a8ac97037eeebbc8108a3a6b36
parent2b3c430bcea5d8c40b218c7e2a71d261822c6a52
use strpbrk(3) to search for characters from a given set

We can check if certain characters are present in a string by calling
strchr(3) on each of them, or we can pass them all to a single
strpbrk(3) call.  The latter is shorter, less repetitive and slightly
more efficient, so let's do that instead.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/show-branch.c
compat/mingw.c
mailinfo.c
t/helper/test-windows-named-pipe.c