summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff.c
diff options
context:
space:
mode:
authortobias <tobias@openbsd.org>2008-02-11 20:33:10 +0000
committertobias <tobias@openbsd.org>2008-02-11 20:33:10 +0000
commit9aad96bc300f8b1b33b3b6f75a2154c1f128aed7 (patch)
treeb151e5000d33dda0013d8843bbcadca092a5d257 /usr.bin/cvs/diff.c
parentThe TCP server has to recalculate the client's window size taken (diff)
downloadwireguard-openbsd-9aad96bc300f8b1b33b3b6f75a2154c1f128aed7.tar.xz
wireguard-openbsd-9aad96bc300f8b1b33b3b6f75a2154c1f128aed7.zip
Cleanup buf implementation:
* Don't check for NULL on buffer creation, because it calls fatal() when something's wrong. * All buffers are supposed to expand if there is no space left in them, so zap flags as well. * Remove code that is now dead. OK joris@ > Inspired by a diff from Igor Zinovik about unchecked return value.
Diffstat (limited to 'usr.bin/cvs/diff.c')
-rw-r--r--usr.bin/cvs/diff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index 2e3b196bf10..02d73ebf55b 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.128 2008/02/09 12:27:31 tobias Exp $ */
+/* $OpenBSD: diff.c,v 1.129 2008/02/11 20:33:11 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -367,8 +367,7 @@ cvs_diff_local(struct cvs_file *cf)
} else {
if (fstat(cf->fd, &st) == -1)
fatal("fstat failed %s", strerror(errno));
- if ((b1 = cvs_buf_load_fd(cf->fd, BUF_AUTOEXT)) == NULL)
- fatal("failed to load %s", cf->file_path);
+ b1 = cvs_buf_load_fd(cf->fd);
tv2[0].tv_sec = st.st_mtime;
tv2[0].tv_usec = 0;