From 34f7ed1fc76dbbcd8f2984d4304ec24ead244b43 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 3 Jun 2010 15:27:43 +0200 Subject: Fix some rare or minor issues found with Clang 2.7 analyzer. --- sink.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sink.c') diff --git a/sink.c b/sink.c index 76cd2bb5..a3f5dea3 100644 --- a/sink.c +++ b/sink.c @@ -649,6 +649,9 @@ int stuffline(struct query *ctl, char *buf) int n, oldphase; char *last; + if (!buf) + return -1; + /* The line may contain NUL characters. Find the last char to use * -- the real line termination is the sequence "\n\0". */ -- cgit v1.2.3