aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-04-05 20:37:01 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-05 20:40:56 +0200
commit45bd913194a1fcda4760e39772155ae4e3fc6a47 (patch)
tree32be76433de1674d8387dcbd06ad0ec97775b9ad /sam.c
parent289a9691b3e59453cdbff89e0b41c14e8d0e30b2 (diff)
downloadvis-45bd913194a1fcda4760e39772155ae4e3fc6a47.tar.gz
vis-45bd913194a1fcda4760e39772155ae4e3fc6a47.tar.xz
vis: fix coverity scan warnings
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sam.c b/sam.c
index 618db3c..11a6c02 100644
--- a/sam.c
+++ b/sam.c
@@ -1162,7 +1162,7 @@ static bool cmd_cd(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor
const char *dir = argv[1];
if (!dir)
dir = getenv("HOME");
- return chdir(dir) == 0;
+ return dir && chdir(dir) == 0;
}
#include "vis-cmds.c"