summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-add.c b/ssh-add.c
index 9cf298918..bc2360e1e 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.139 2019/06/06 05:13:13 otto Exp $ */ 1/* $OpenBSD: ssh-add.c,v 1.140 2019/06/28 13:35:04 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -203,7 +203,7 @@ add_file(int agent_fd, const char *filename, int key_only, int qflag)
203 if (strcmp(filename, "-") == 0) { 203 if (strcmp(filename, "-") == 0) {
204 fd = STDIN_FILENO; 204 fd = STDIN_FILENO;
205 filename = "(stdin)"; 205 filename = "(stdin)";
206 } else if ((fd = open(filename, O_RDONLY)) < 0) { 206 } else if ((fd = open(filename, O_RDONLY)) == -1) {
207 perror(filename); 207 perror(filename);
208 return -1; 208 return -1;
209 } 209 }
@@ -727,7 +727,7 @@ main(int argc, char **argv)
727 for (i = 0; default_files[i]; i++) { 727 for (i = 0; default_files[i]; i++) {
728 snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, 728 snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
729 default_files[i]); 729 default_files[i]);
730 if (stat(buf, &st) < 0) 730 if (stat(buf, &st) == -1)
731 continue; 731 continue;
732 if (do_file(agent_fd, deleting, key_only, buf, 732 if (do_file(agent_fd, deleting, key_only, buf,
733 qflag) == -1) 733 qflag) == -1)