diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 13:35:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 13:35:06 +0000 |
commit | 61656abc7ff84215165af1bd464bc053b3b66158 (patch) | |
tree | c7eabb0c4fa9faa024e724e99c240c40da07ca42 /usr.bin/cvs/commit.c | |
parent | 18603ebf99fbb890ae9666cb0c4aa9f879e7edaa (diff) |
When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r-- | usr.bin/cvs/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index c1523e442f3..61d5dd26217 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.159 2018/12/30 23:09:58 guenther Exp $ */ +/* $OpenBSD: commit.c,v 1.160 2019/06/28 13:35:00 deraadt Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -537,7 +537,7 @@ cvs_commit_local(struct cvs_file *cf) } cf->repo_fd = open(cf->file_rpath, openflags); - if (cf->repo_fd < 0) + if (cf->repo_fd == -1) fatal("cvs_commit_local: %s", strerror(errno)); cf->file_rcs = rcs_open(cf->file_rpath, cf->repo_fd, |