From f40de21e5666be6fa456fedc60584bd672d12c44 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 22 Jan 2013 08:29:55 -0800 Subject: Removing some more cruft. --- src/BRegex.cc | 3 +-- src/Input.cc | 2 ++ src/Output.cc | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/BRegex.cc b/src/BRegex.cc index 1ada2f1..d755e04 100644 --- a/src/BRegex.cc +++ b/src/BRegex.cc @@ -35,10 +35,9 @@ Balau::String Balau::Regex::getError(int err) const { char * t; s = regerror(err, &m_regex, NULL, 0); - t = (char *) malloc(s); + t = (char *) alloca(s); regerror(err, &m_regex, t, s); String r(t, s - 1); - free(t); return r; } diff --git a/src/Input.cc b/src/Input.cc index a86468e..ebcffb3 100644 --- a/src/Input.cc +++ b/src/Input.cc @@ -275,6 +275,8 @@ ssize_t Balau::Input::read(void * buf, size_t count) throw (GeneralException) { } IAssert(false, "Shouldn't end up there."); + + return -1; } bool Balau::Input::isClosed() { diff --git a/src/Output.cc b/src/Output.cc index 9f5e370..3ca97b0 100644 --- a/src/Output.cc +++ b/src/Output.cc @@ -275,6 +275,8 @@ ssize_t Balau::Output::write(const void * buf, size_t count) throw (GeneralExcep } IAssert(false, "Shouldn't end up there."); + + return -1; } bool Balau::Output::isClosed() { -- cgit v1.2.3