diff options
| author | 2007-09-17 10:07:21 +0000 | |
|---|---|---|
| committer | 2007-09-17 10:07:21 +0000 | |
| commit | bb59aecc3f6eb89a9091d6bc56d8f11c50fa3b65 (patch) | |
| tree | 79ce76011b5abcb027a0906dff0320611eaea503 /usr.bin/cvs/diff3.c | |
| parent | fix the arch code mostly. (diff) | |
| download | wireguard-openbsd-bb59aecc3f6eb89a9091d6bc56d8f11c50fa3b65.tar.xz wireguard-openbsd-bb59aecc3f6eb89a9091d6bc56d8f11c50fa3b65.zip | |
Imported atomicio interface.
Requested by ray@, OK joris@
Diffstat (limited to 'usr.bin/cvs/diff3.c')
| -rw-r--r-- | usr.bin/cvs/diff3.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c index 3f05e815907..9c811594429 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.38 2007/09/10 14:29:53 tobias Exp $ */ +/* $OpenBSD: diff3.c,v 1.39 2007/09/17 10:07:21 tobias Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,7 +72,7 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.38 2007/09/10 14:29:53 tobias Exp $"; + "$OpenBSD: diff3.c,v 1.39 2007/09/17 10:07:21 tobias Exp $"; #endif /* not lint */ #include <ctype.h> @@ -83,6 +83,7 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> +#include "atomicio.h" #include "cvs.h" #include "diff.h" @@ -245,7 +246,8 @@ cvs_merge_file(struct cvs_file *cf, int verbose) if (lp->l_line == NULL) continue; - if (write(cf->fd, lp->l_line, lp->l_len) == -1) + if (atomicio(vwrite, cf->fd, lp->l_line, lp->l_len) != + lp->l_len) fatal("cvs_merge_file: %s", strerror(errno)); } |
