From 404f1dc875990e0ff79d51b87fd1348190ce5fc6 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 11 Feb 2008 20:33:12 +0000 Subject: 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. --- usr.bin/cvs/logmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/logmsg.c') 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 * @@ -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'; -- cgit v1.2.3