diff options
author | David Leadbeater <dgl@dgl.cx> | 2014-07-06 21:52:03 +0100 |
---|---|---|
committer | David Leadbeater <dgl@dgl.cx> | 2014-07-06 21:52:03 +0100 |
commit | dac67a567d8c1ffc63a38f94349ea37d2dc4f2c1 (patch) | |
tree | 47553ef10a36ebda7fa79ce434a7d7611a271d51 /src/core/commands.c | |
parent | 85d9fa1922a5f408dd40f18287f01135dd826e4d (diff) | |
download | irssi-dac67a567d8c1ffc63a38f94349ea37d2dc4f2c1.zip |
Check return values from some syscalls and warn if they fail
Diffstat (limited to 'src/core/commands.c')
-rw-r--r-- | src/core/commands.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/commands.c b/src/core/commands.c index 547f7b16..ed82f44e 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -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); } |