From 4f4060f6abbfa004e0eb63b7c447776cc74c8d66 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 8 Sep 2018 20:16:59 +0200 Subject: *: fix clang-6 SA warnings I don't see these in CI, but my local clang-6 does emit warnings for these. Signed-off-by: David Lamparter --- lib/csv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/csv.c') diff --git a/lib/csv.c b/lib/csv.c index ce84783aa6..2752974df5 100644 --- a/lib/csv.c +++ b/lib/csv.c @@ -563,6 +563,8 @@ void csv_decode(csv_t *csv, char *inbuf) csv_record_t *rec; buf = (inbuf) ? inbuf : csv->buf; + assert(buf); + pos = strpbrk(buf, "\n"); while (pos != NULL) { rec = calloc(1, sizeof(csv_record_t)); -- cgit v1.2.3