diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-02-18 09:01:54 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-02-18 09:01:54 +0000 |
commit | 60ef6409c84cecb4e3263916349840696e88cbcf (patch) | |
tree | dc2a643c137466da37cca75243f33c14c5abca71 /navit/support | |
parent | 7f502510346a2f3898cd536cef889d84eddc4ed9 (diff) | |
download | navit-60ef6409c84cecb4e3263916349840696e88cbcf.tar.gz |
Fix:support_wordexp:Portability
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4192 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/support')
-rw-r--r-- | navit/support/wordexp/wordexp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/navit/support/wordexp/wordexp.c b/navit/support/wordexp/wordexp.c index d901b13d3..5e4f11992 100644 --- a/navit/support/wordexp/wordexp.c +++ b/navit/support/wordexp/wordexp.c @@ -35,7 +35,7 @@ is_valid_variable_char(char c, int pos) static char * expand_variables(const char *in) { - char *var,*pos,*ret=strdup(in); + char *var,*pos,*ret=g_strdup(in); char *val,*str; pos=ret; while ((var=strchr(pos, '$'))) { @@ -54,7 +54,7 @@ expand_variables(const char *in) npos++; bpos=npos; } - name=strdup(begin); + name=g_strdup(begin); name[bpos]='\0'; val=getenv(name); free(name); @@ -107,7 +107,7 @@ wordexp(const char *words, wordexp_t *we, int flags) we->we_wordv = malloc(we->we_wordc * sizeof(char*)); for (i=0; i<we->we_wordc; i++) { - we->we_wordv[i] = strdup(pglob.gl_pathv[i]); + we->we_wordv[i] = g_strdup(pglob.gl_pathv[i]); } globfree(&pglob); free(words_expanded); |