summaryrefslogtreecommitdiff
path: root/vtysh/vtysh_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtysh/vtysh_main.c')
-rw-r--r--vtysh/vtysh_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 8509a8a05a..57042f8e62 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -533,7 +533,7 @@ int main(int argc, char **argv, char **env)
fp = open(history_file, O_CREAT | O_EXCL,
S_IRUSR | S_IWUSR);
- if (fp)
+ if (fp != -1)
close(fp);
read_history(history_file);