]> granicus.if.org Git - git/commit
attr.c: simplify macroexpand_one()
authorJunio C Hamano <gitster@pobox.com>
Sat, 28 Jan 2017 02:01:47 +0000 (18:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Feb 2017 21:46:52 +0000 (13:46 -0800)
commit4b0c6961678b3feddd8974e8ad6c49c62da9e5cd
treec545fb0d797f8bcfe120fb36080f2503b5f32d89
parent034d35c9aa8e925425730957af71ce3d077ff335
attr.c: simplify macroexpand_one()

The double-loop wants to do an early return immediately when one
matching macro is found.  Eliminate the extra variable 'a' used for
that purpose and rewrite the "assign the found item to 'a' to make
it non-NULL and force the loop(s) to terminate" with a direct return
from there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c