diff options
author | 2005-07-26 14:58:58 +0000 | |
---|---|---|
committer | 2005-07-26 14:58:58 +0000 | |
commit | 4704b0448f9e85966c22415aa55c2ded0a8cc428 (patch) | |
tree | af0eefc40b1e063f6358e6cd96f2e36c486f21df /usr.bin/cvs | |
parent | no need to complain that we cannot remove the file in cvs_unlink() (diff) | |
download | wireguard-openbsd-4704b0448f9e85966c22415aa55c2ded0a8cc428.tar.xz wireguard-openbsd-4704b0448f9e85966c22415aa55c2ded0a8cc428.zip |
remove the (errno != ENOENT) check now that it is included in cvs_unlink();
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/remove.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/resp.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index 2dc2006882a..fd3afbdf432 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.27 2005/07/25 20:15:35 xsa Exp $ */ +/* $OpenBSD: remove.c,v 1.28 2005/07/26 14:58:58 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004, 2005 Xavier Santolaria <xsa@openbsd.org> @@ -177,7 +177,7 @@ cvs_remove_local(CVSFILE *cf, void *arg) cvs_log(LP_ERRNO, "%s", buf); return (CVS_EX_DATA); } - if ((cvs_unlink(buf) == -1) && (errno != ENOENT)) + if (cvs_unlink(buf) == -1) return (CVS_EX_FILE); if (verbosity > 1) @@ -226,7 +226,7 @@ int cvs_remove_file(const char *fpath) { /* if -f option is used, physically remove the file */ if (force_remove == 1) { - if((cvs_unlink(fpath) == -1) && (errno != ENOENT)) + if(cvs_unlink(fpath) == -1) return (-1); nuked++; } diff --git a/usr.bin/cvs/resp.c b/usr.bin/cvs/resp.c index e36b72b2be1..ee9885a96f6 100644 --- a/usr.bin/cvs/resp.c +++ b/usr.bin/cvs/resp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resp.c,v 1.50 2005/07/25 12:05:43 xsa Exp $ */ +/* $OpenBSD: resp.c,v 1.51 2005/07/26 14:58:58 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -368,7 +368,7 @@ cvs_resp_statdir(struct cvsroot *root, int type, char *line) if (cvs_noexec == 0) { if ((type == CVS_RESP_CLRSTATDIR) && - (cvs_unlink(statpath) == -1) && (errno != ENOENT)) { + (cvs_unlink(statpath) == -1)) { return (-1); } else if (type == CVS_RESP_SETSTATDIR) { fd = open(statpath, O_CREAT|O_TRUNC|O_WRONLY, 0644); |