Permalink
Browse files

Prevent a compile warning

This code still needs to be written properly rather than using system().
  • Loading branch information...
1 parent f9ce442 commit 5d2e143fcc35d414b52bbc1ab79e7367f449d07e @codebrainz committed Nov 23, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/config.c
View
@@ -177,6 +177,7 @@ static void config_create(void)
/* FIXME */
char command[PATH_MAX + 11] = { 0 };
char *path = strdup(config_get_path());
+ int ret;
#ifdef HAVE_WINDOWS
if (FileExists(dirname(path)))
{
@@ -187,7 +188,8 @@ static void config_create(void)
#else
snprintf(command, PATH_MAX + 11, "mkdir -p \"%s\"", dirname(path));
#endif
- (void) system(command);
+ if (system(command))
+ fprintf(stderr, "warning: there was a problem creating config directory.\n");
free(path);
}

0 comments on commit 5d2e143

Please sign in to comment.