X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fnames.c;h=05f89b15d19ab615c793c7dcc4709a436c294ac0;hb=d3daaa199aca7497bb507f92b693c8457353f96a;hp=73b8741858e70335c0d99c211919143cf78b1cff;hpb=138fc7e67e3d9845cd7d81aad0e9c7724784f9b9;p=tar diff --git a/src/names.c b/src/names.c index 73b8741..05f89b1 100644 --- a/src/names.c +++ b/src/names.c @@ -289,9 +289,8 @@ static int matching_flags; /* exclude_fnmatch options */ static storage and can't be relied upon across two calls. If CHANGE_DIRS is true, treat any entries of type NELT_CHDIR as - the request to change to the given directory. If filename_terminator - is NUL, CHANGE_DIRS is effectively always false. - + the request to change to the given directory. + Entries of type NELT_FMASK cause updates of the matching_flags value. */ struct name_elt * @@ -301,9 +300,6 @@ name_next_elt (int change_dirs) const char *source; char *cursor; - if (filename_terminator == '\0') - change_dirs = 0; - while (name_index != names) { struct name_elt *ep; @@ -392,9 +388,7 @@ name_gather (void) if (allocated_size == 0) { allocated_size = offsetof (struct name, name) + NAME_FIELD_SIZE + 1; - buffer = xmalloc (allocated_size); - /* FIXME: This memset is overkill, and ugly... */ - memset (buffer, 0, allocated_size); + buffer = xzalloc (allocated_size); } while ((ep = name_next_elt (0)) && ep->type == NELT_CHDIR)