Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: do not ignore return value from getcwd()
  • Loading branch information
perexg committed Sep 8, 2014
1 parent fe4dbc2 commit 04e9466
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.c
Expand Up @@ -976,7 +976,10 @@ dobackup(const char *oldver)
tvhinfo("config", "backup: migrating config from %s (running %s)",
oldver, tvheadend_version);

getcwd(cwd, sizeof(cwd));
if (getcwd(cwd, sizeof(cwd)) == NULL) {
tvherror("config", "unable to get the current working directory");
goto fatal;
}

if (!access("/bin/tar", X_OK))
argv[0] = "/bin/tar";
Expand Down

0 comments on commit 04e9466

Please sign in to comment.