diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-05 20:37:01 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-05 20:40:56 +0200 |
| commit | 45bd913194a1fcda4760e39772155ae4e3fc6a47 (patch) | |
| tree | 32be76433de1674d8387dcbd06ad0ec97775b9ad | |
| parent | 289a9691b3e59453cdbff89e0b41c14e8d0e30b2 (diff) | |
| download | vis-45bd913194a1fcda4760e39772155ae4e3fc6a47.tar.gz vis-45bd913194a1fcda4760e39772155ae4e3fc6a47.tar.xz | |
vis: fix coverity scan warnings
| -rw-r--r-- | main.c | 2 | ||||
| -rw-r--r-- | sam.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1243,7 +1243,7 @@ static const char *repeat(Vis *vis, const char *keys, const Arg *arg) { static const char *cursors_new(Vis *vis, const char *keys, const Arg *arg) { View *view = vis_view(vis); for (int count = vis_count_get_default(vis, 1); count > 0; count--) { - Cursor *cursor; + Cursor *cursor = NULL; switch (arg->i) { case -1: case +1: @@ -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" |
