Use strerror() for more usefull errormessages

This commit is contained in:
Axel Wagner
2011-01-01 16:48:30 +01:00
parent b40b921228
commit 497a091fbb
5 changed files with 15 additions and 12 deletions

View File

@ -30,7 +30,7 @@ char *expand_path(char *path) {
}
char *result = strdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path);
if (result == NULL) {
ELOG("malloc() failed\n");
ELOG("malloc() failed: %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
globfree(&globbuf);