diff options
author | 2005-12-22 02:26:33 +0000 | |
---|---|---|
committer | 2005-12-22 02:26:33 +0000 | |
commit | 44df50c3a1df1678deb8f6788da14a17a84b4119 (patch) | |
tree | ddaac61309b48ffc7577604407dcbc5b7a74420d | |
parent | document 3 zaurus sysctl options (diff) | |
download | wireguard-openbsd-44df50c3a1df1678deb8f6788da14a17a84b4119.tar.xz wireguard-openbsd-44df50c3a1df1678deb8f6788da14a17a84b4119.zip |
- fix handling of zero byte files.
with this diff, open cvs can do a full local checkout of the XF4 tree on
64-bit architectures, which gnu cvs cannot due to some bug.
ok joris@
-rw-r--r-- | usr.bin/cvs/rcs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 04d7005788f..a23fc84b9dc 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.114 2005/12/20 18:17:01 xsa Exp $ */ +/* $OpenBSD: rcs.c,v 1.115 2005/12/22 02:26:33 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1240,6 +1240,11 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev) } len = rdp->rd_tlen; + if (len == 0) { + rbuf = cvs_buf_alloc(1, 0); + cvs_buf_empty(rbuf); + return (rbuf); + } if ((rbuf = cvs_buf_alloc(len, BUF_AUTOEXT)) == NULL) return (NULL); |