summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-03-29 19:41:50 -0400
committerDave Barach <dave@barachs.net>2019-03-29 19:47:30 -0400
commit19e540f73e60ccd47b0fbc0fbf543ba1703a2e5c (patch)
tree7085fe55c8584be3419c95acb056ee7617d8b387 /src
parent26dc58bfa7548582151958ec9dab301367a22c51 (diff)
Convince Coverity that s = format (0, ...) is OK
Change-Id: Ia88c7228a46e251b8a7815240da6ddbbcde08bc7 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/format.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vppinfra/format.c b/src/vppinfra/format.c
index 886f03d9c5f..072ff3b3362 100644
--- a/src/vppinfra/format.c
+++ b/src/vppinfra/format.c
@@ -422,6 +422,10 @@ format (u8 * s, const char *fmt, ...)
va_start (va, fmt);
s = va_format (s, fmt, &va);
va_end (va);
+#ifdef __COVERITY__
+ if (s == 0)
+ return (u8 *) "liar liar pants on fire s can't be zero!";
+#endif
return s;
}