retab! src/config.c

This commit is contained in:
Michael Stapelberg 2009-05-30 22:24:05 +02:00
parent 54fb9435f8
commit 706c44509e

View File

@ -25,12 +25,12 @@ Config config;
* *
*/ */
static char *glob_path(const char *path) { static char *glob_path(const char *path) {
static glob_t globbuf; static glob_t globbuf;
if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0)
die("glob() failed"); die("glob() failed");
char *result = sstrdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path); char *result = sstrdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path);
globfree(&globbuf); globfree(&globbuf);
return result; return result;
} }