summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-02-11 20:33:12 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-02-11 20:33:12 +0000
commit404f1dc875990e0ff79d51b87fd1348190ce5fc6 (patch)
tree8470ab7922bf4a506ca038230975e352745de5de /usr.bin/cvs/file.c
parente1a1163925c6ab56d029629de9c3bd8b72cb9555 (diff)
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/file.c')
-rw-r--r--usr.bin/cvs/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 556b6dca588..0c26a98f7f0 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.221 2008/02/10 14:00:41 joris Exp $ */
+/* $OpenBSD: file.c,v 1.222 2008/02/11 20:33:11 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -754,9 +754,7 @@ cvs_file_classify(struct cvs_file *cf, const char *tag)
if (b1 == NULL)
fatal("failed to get HEAD revision for comparison");
- b2 = cvs_buf_load_fd(cf->fd, BUF_AUTOEXT);
- if (b2 == NULL)
- fatal("failed to get file content for comparison");
+ b2 = cvs_buf_load_fd(cf->fd);
if (cvs_buf_differ(b1, b2))
ismodified = 1;