]> git.proxmox.com Git - mirror_frr.git/blobdiff - vtysh/vtysh_main.c
*: fix coverity warnings - error handling issues
[mirror_frr.git] / vtysh / vtysh_main.c
index 8509a8a05ab06ef67bf0d97c9a691211e2882bb5..57042f8e620949a788f2ec65ccbe446d9861bcc4 100644 (file)
@@ -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);