diff options
-rw-r--r-- | usr.bin/cvs/buf.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/buf.h | 4 | ||||
-rw-r--r-- | usr.bin/rcs/ci.c | 20 | ||||
-rw-r--r-- | usr.bin/rcs/rcsmerge.c | 8 |
4 files changed, 10 insertions, 29 deletions
diff --git a/usr.bin/cvs/buf.c b/usr.bin/cvs/buf.c index 5933a9b51ca..74614a18062 100644 --- a/usr.bin/cvs/buf.c +++ b/usr.bin/cvs/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.38 2006/03/20 16:18:13 niallo Exp $ */ +/* $OpenBSD: buf.c,v 1.39 2006/03/23 08:50:41 xsa Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -219,9 +219,8 @@ cvs_buf_set(BUF *b, const void *src, size_t len, size_t off) * cvs_buf_putc() * * Append a single character <c> to the end of the buffer <b>. - * Returns 0 on success. */ -int +void cvs_buf_putc(BUF *b, int c) { u_char *bp; @@ -238,8 +237,6 @@ cvs_buf_putc(BUF *b, int c) } *bp = (u_char)c; b->cb_len++; - - return (0); } /* diff --git a/usr.bin/cvs/buf.h b/usr.bin/cvs/buf.h index 523805fc62f..f91af7bebed 100644 --- a/usr.bin/cvs/buf.h +++ b/usr.bin/cvs/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.11 2006/03/20 16:18:13 niallo Exp $ */ +/* $OpenBSD: buf.h,v 1.12 2006/03/23 08:50:41 xsa Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -56,7 +56,7 @@ ssize_t cvs_buf_set(BUF *, const void *, size_t, size_t); ssize_t cvs_buf_append(BUF *, const void *, size_t); ssize_t cvs_buf_fappend(BUF *, const char *, ...) __attribute__((format(printf, 2, 3))); -int cvs_buf_putc(BUF *, int); +void cvs_buf_putc(BUF *, int); size_t cvs_buf_len(BUF *); const void *cvs_buf_peek(BUF *, size_t); int cvs_buf_write_fd(BUF *, int); diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index 4ac206fa4d2..5dcad5bc3f3 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.123 2006/03/20 16:18:13 niallo Exp $ */ +/* $OpenBSD: ci.c,v 1.124 2006/03/23 08:50:41 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -518,11 +518,7 @@ checkin_update(struct checkin_params *pb) return (-1); } - if (cvs_buf_putc(bp, '\0') < 0) { - rcs_close(pb->file); - return (-1); - } - + cvs_buf_putc(bp, '\0'); filec = (char *)cvs_buf_release(bp); /* Get RCS patch */ @@ -636,11 +632,7 @@ checkin_init(struct checkin_params *pb) return (-1); } - if (cvs_buf_putc(bp, '\0') < 0) { - rcs_close(pb->file); - return (-1); - } - + cvs_buf_putc(bp, '\0'); filec = (char *)cvs_buf_release(bp); /* Get default values from working copy if -k specified */ @@ -665,11 +657,7 @@ checkin_init(struct checkin_params *pb) rcs_close(pb->file); return (-1); } - if (cvs_buf_putc(dp, '\0') < 0) { - xfree(filec); - rcs_close(pb->file); - return (-1); - } + cvs_buf_putc(dp, '\0'); rcs_desc = (const char *)cvs_buf_release(dp); } } diff --git a/usr.bin/rcs/rcsmerge.c b/usr.bin/rcs/rcsmerge.c index 830cb848121..54f90713566 100644 --- a/usr.bin/rcs/rcsmerge.c +++ b/usr.bin/rcs/rcsmerge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsmerge.c,v 1.21 2006/03/16 04:04:57 ray Exp $ */ +/* $OpenBSD: rcsmerge.c,v 1.22 2006/03/23 08:50:41 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * All rights reserved. @@ -142,11 +142,7 @@ rcsmerge_main(int argc, char **argv) } if (pipeout == 1) { - if (cvs_buf_putc(bp, '\0') < 0) { - rcs_close(file); - continue; - } - + cvs_buf_putc(bp, '\0'); fcont = cvs_buf_release(bp); printf("%s", fcont); xfree(fcont); |