aboutsummaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/grep.c b/grep.c
index 279a55933..a947a68a7 100644
--- a/grep.c
+++ b/grep.c
@@ -16,6 +16,11 @@ static struct grep_opt grep_defaults;
void init_grep_defaults(void)
{
struct grep_opt *opt = &grep_defaults;
+ static int run_once;
+
+ if (run_once)
+ return;
+ run_once++;
memset(opt, 0, sizeof(*opt));
opt->relative = 1;