diff --git a/dir.c b/dir.c index 3f7a0256b6..736ff2ac11 100644 --- a/dir.c +++ b/dir.c @@ -501,9 +501,7 @@ void clear_exclude_list(struct exclude_list *el) free(el->excludes); free(el->filebuf); - el->nr = 0; - el->excludes = NULL; - el->filebuf = NULL; + memset(el, 0, sizeof(*el)); } static void trim_trailing_spaces(char *buf)