Fixed warning, ignoring return value of ‘getcwd’, declared with attribute warn_unused_result

This commit is contained in:
Mattias Wadman 2009-04-10 12:06:55 +00:00
parent d959b67aa8
commit 93418573c4

View file

@ -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);
}