summaryrefslogtreecommitdiffstats
path: root/lib/csv.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 20:16:59 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 20:34:35 +0200
commit4f4060f6abbfa004e0eb63b7c447776cc74c8d66 (patch)
treedb67b768f3c17767dc6aff86e17da01590b26df8 /lib/csv.c
parentlib: fix SA warning in skiplist code (diff)
downloadfrr-4f4060f6abbfa004e0eb63b7c447776cc74c8d66.tar.xz
frr-4f4060f6abbfa004e0eb63b7c447776cc74c8d66.zip
*: 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 <equinox@diac24.net>
Diffstat (limited to 'lib/csv.c')
-rw-r--r--lib/csv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/csv.c b/lib/csv.c
index ce84783aa..2752974df 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));