mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
Check return values from some syscalls and warn if they fail
This commit is contained in:
parent
85d9fa1922
commit
dac67a567d
3 changed files with 14 additions and 5 deletions
|
|
@ -968,7 +968,9 @@ static void cmd_cd(const char *data)
|
|||
if (*data == '\0') return;
|
||||
|
||||
str = convert_home(data);
|
||||
chdir(str);
|
||||
if (chdir(str) != 0) {
|
||||
g_warning("Failed to chdir(): %s", strerror(errno));
|
||||
}
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue