diff options
author | 2008-02-11 20:33:10 +0000 | |
---|---|---|
committer | 2008-02-11 20:33:10 +0000 | |
commit | 9aad96bc300f8b1b33b3b6f75a2154c1f128aed7 (patch) | |
tree | b151e5000d33dda0013d8843bbcadca092a5d257 /usr.bin/cvs/logmsg.c | |
parent | The TCP server has to recalculate the client's window size taken (diff) | |
download | wireguard-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/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'; |