- /* Regular expressions (shell globbing, actually). */
-
- if (cursor->regexp)
- {
- if (fnmatch (cursor->name, path, FNM_LEADING_DIR) == 0)
- {
- cursor->found = 1; /* remember it matched */
- if (starting_file_option)
- {
- free (namelist);
- namelist = NULL;
- }
- chdir_from_initial_wd (cursor->change_dir);
-
- /* We got a match. */
- return 1;
- }
- continue;
- }
-
- /* Plain Old Strings. */
-
- if (cursor->length <= length
- /* archive length >= specified */
- && (path[cursor->length] == '\0'
- || path[cursor->length] == '/')
- /* full match on file/dirname */
- && strncmp (path, cursor->name, cursor->length) == 0)
- /* name compare */
+ if (cursor->regexp
+ ? fnmatch (cursor->name, path, FNM_LEADING_DIR) == 0
+ : (cursor->length <= length
+ && (path[cursor->length] == '\0'
+ || path[cursor->length] == '/')
+ && memcmp (path, cursor->name, cursor->length) == 0))