diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-02-11 20:33:12 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-02-11 20:33:12 +0000 |
commit | 404f1dc875990e0ff79d51b87fd1348190ce5fc6 (patch) | |
tree | 8470ab7922bf4a506ca038230975e352745de5de /usr.bin/cvs/logmsg.c | |
parent | e1a1163925c6ab56d029629de9c3bd8b72cb9555 (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/logmsg.c')
-rw-r--r-- | usr.bin/cvs/logmsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c index b76e56e3972..fa2fd795a61 100644 --- a/usr.bin/cvs/logmsg.c +++ b/usr.bin/cvs/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.45 2007/09/25 10:04:47 chl Exp $ */ +/* $OpenBSD: logmsg.c,v 1.46 2008/02/11 20:33:11 tobias Exp $ */ /* * Copyright (c) 2007 Joris Vink <joris@openbsd.org> * @@ -58,7 +58,7 @@ cvs_logmsg_read(const char *path) fatal("cvs_logmsg_read: fdopen %s", strerror(errno)); lbuf = NULL; - bp = cvs_buf_alloc(st.st_size, BUF_AUTOEXT); + bp = cvs_buf_alloc(st.st_size); while ((buf = fgetln(fp, &len))) { if (buf[len - 1] == '\n') { buf[len - 1] = '\0'; |