summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff3.c
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2005-12-24 04:10:51 +0000
committerjoris <joris@openbsd.org>2005-12-24 04:10:51 +0000
commitecfb32e086223d04e2cb7e17612b38a236036e08 (patch)
treeeffa94b9a34adc529e94c05f404f1540249cc750 /usr.bin/cvs/diff3.c
parentwe should be calling cvs_vlog(); to at least get some decent output; (diff)
downloadwireguard-openbsd-ecfb32e086223d04e2cb7e17612b38a236036e08.tar.xz
wireguard-openbsd-ecfb32e086223d04e2cb7e17612b38a236036e08.zip
remove useless cvs_buf_alloc() failure checks;
Diffstat (limited to 'usr.bin/cvs/diff3.c')
-rw-r--r--usr.bin/cvs/diff3.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c
index f7939d85c64..3800ed09d6f 100644
--- a/usr.bin/cvs/diff3.c
+++ b/usr.bin/cvs/diff3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3.c,v 1.9 2005/12/20 18:17:01 xsa Exp $ */
+/* $OpenBSD: diff3.c,v 1.10 2005/12/24 04:10:51 joris Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -71,7 +71,7 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: diff3.c,v 1.9 2005/12/20 18:17:01 xsa Exp $";
+static const char rcsid[] = "$OpenBSD: diff3.c,v 1.10 2005/12/24 04:10:51 joris Exp $";
#endif /* not lint */
#include <sys/queue.h>
@@ -187,14 +187,9 @@ cvs_diff3(RCSFILE *rf, char *workfile, RCSNUM *rev1, RCSNUM *rev2)
if ((b3 = rcs_getrev(rf, rev2)) == NULL)
goto out;
- if ((d1 = cvs_buf_alloc((size_t)128, BUF_AUTOEXT)) == NULL)
- goto out;
-
- if ((d2 = cvs_buf_alloc((size_t)128, BUF_AUTOEXT)) == NULL)
- goto out;
-
- if ((diffb = cvs_buf_alloc((size_t)128, BUF_AUTOEXT)) == NULL)
- goto out;
+ d1 = cvs_buf_alloc((size_t)128, BUF_AUTOEXT);
+ d2 = cvs_buf_alloc((size_t)128, BUF_AUTOEXT);
+ diffb = cvs_buf_alloc((size_t)128, BUF_AUTOEXT);
strlcpy(path1, "/tmp/diff1.XXXXXXXXXX", sizeof(path1));
cvs_buf_write_stmp(b1, path1, 0600);