summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2013-01-22 08:29:55 -0800
committerPixel <pixel@nobis-crew.org>2013-01-22 08:29:55 -0800
commitf40de21e5666be6fa456fedc60584bd672d12c44 (patch)
treeb80497de619e661e246725b1cebcd68533d4e237 /src
parent107d87dc983f34e4ff23a4db188baa650ac51f98 (diff)
Removing some more cruft.
Diffstat (limited to 'src')
-rw-r--r--src/BRegex.cc3
-rw-r--r--src/Input.cc2
-rw-r--r--src/Output.cc2
3 files changed, 5 insertions, 2 deletions
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() {