aboutsummaryrefslogtreecommitdiffstats
path: root/lib/glob/glob.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2001-04-06 19:14:31 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:53 +0000
commit28ef6c316f1aff914bb95ac09787a3c83c1815fd (patch)
tree2812fe7ffc9beec4f99856906ddfcafda54cf16a /lib/glob/glob.c
parentbb70624e964126b7ac4ff085ba163a9c35ffa18f (diff)
downloadandroid_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.gz
android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.bz2
android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.zip
Imported from ../bash-2.05.tar.gz.
Diffstat (limited to 'lib/glob/glob.c')
-rw-r--r--lib/glob/glob.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/glob/glob.c b/lib/glob/glob.c
index c272274..69d0e54 100644
--- a/lib/glob/glob.c
+++ b/lib/glob/glob.c
@@ -343,7 +343,7 @@ glob_vector (pat, dir)
return ((char **) &glob_error_return);
/* Compute the flags that will be passed to fnmatch(). We don't
- need to do this every time through the loop. */
+ need to do this every time through the loop. */
flags = (noglob_dot_filenames ? FNM_PERIOD : 0) | FNM_PATHNAME;
#ifdef FNM_CASEFOLD
@@ -480,14 +480,11 @@ glob_dir_to_array (dir, array)
+ strlen (array[i]) + 1);
if (result[i] == NULL)
return (NULL);
-#if 1
+
strcpy (result[i], dir);
if (add_slash)
- result[i][l] = '/';
+ result[i][l] = '/';
strcpy (result[i] + l + add_slash, array[i]);
-#else
- (void)sprintf (result[i], "%s%s%s", dir, add_slash ? "/" : "", array[i]);
-#endif
}
result[i] = NULL;