projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71fda00
)
shared/util: Fix glob_extend() argument
author
Bastien Nocera
<hadess@hadess.net>
Mon, 14 Oct 2013 06:15:51 +0000
(08:15 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 14 Oct 2013 14:11:33 +0000
(10:11 -0400)
glob_extend() would completely fail to work, or return incorrect
data if it wasn't being passed the current getopt "optarg" variable
as it used the global variable, instead of the passed parameters.
src/shared/util.c
patch
|
blob
|
history
diff --git
a/src/shared/util.c
b/src/shared/util.c
index
54dbace
..
1822770
100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-4461,7
+4461,7
@@
int glob_extend(char ***strv, const char *path) {
char **p;
errno = 0;
- k = glob(
optarg
, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
+ k = glob(
path
, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
if (k == GLOB_NOMATCH)
return -ENOENT;