Fixed warning, ignoring return value of ‘getcwd’, declared with attribute warn_unused_result
This commit is contained in:
parent
d959b67aa8
commit
93418573c4
1 changed files with 3 additions and 1 deletions
|
@ -78,7 +78,9 @@ pull_chute (int sig)
|
|||
{
|
||||
char pwd[PATH_MAX];
|
||||
|
||||
getcwd(pwd, sizeof(pwd));
|
||||
if(getcwd(pwd, sizeof(pwd)) == NULL)
|
||||
strncpy(pwd, strerror(errno), sizeof(pwd));
|
||||
|
||||
syslog(LOG_ERR, "HTS Tvheadend crashed on signal %i (pwd \"%s\")",
|
||||
sig, pwd);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue