Unify code paths of threaded greps
commitec76125f9d761c08e28f2c55a57cf350ddae5fd9
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 7 Feb 2010 18:58:28 +0000 (7 19:58 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 12 Jun 2010 11:09:32 +0000 (12 13:09 +0200)
tree37f5d12c61c18efa46487c822da0747be8401716
parent665f9e5a2b29ba6b1fc0fd5176dd14e7e6420977
Unify code paths of threaded greps

There were two awfully similar code paths ending the threaded grep. It
is better to avoid duplicated code, though.

This change might very well prevent a race, where the grep patterns were
free()d before waiting that all threads finished.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
builtin/grep.c