From a7209ea58d1dc35aa5b6c663619481fc53e1149d Mon Sep 17 00:00:00 2001 From: Michal Luscon Date: Mon, 2 Apr 2012 16:35:34 +0200 Subject: [PATCH] Fix --daemon wrong destination place bug Signed-off-by: Michal Luscon --- util.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/util.c b/util.c index ea9ca7d..8347bbe 100644 --- a/util.c +++ b/util.c @@ -749,7 +749,6 @@ int glob_expand(const char *arg, char ***argv_p, int *argc_p, int *maxargs_p) /* This routine is only used in daemon mode. */ void glob_expand_module(char *base1, char *arg, char ***argv_p, int *argc_p, int *maxargs_p) { - char *p, *s; char *base = base1; int base_len = strlen(base); @@ -762,17 +761,7 @@ void glob_expand_module(char *base1, char *arg, char ***argv_p, int *argc_p, int if (!(arg = strdup(arg))) out_of_memory("glob_expand_module"); - if (asprintf(&base," %s/", base1) < 0) - out_of_memory("glob_expand_module"); - base_len++; - - for (s = arg; *s; s = p + base_len) { - if ((p = strstr(s, base)) != NULL) - *p = '\0'; /* split it at this point */ - glob_expand(s, argv_p, argc_p, maxargs_p); - if (!p) - break; - } + glob_expand(arg, argv_p, argc_p, maxargs_p); free(arg); free(base); -- 1.7.7.6