From 19e540f73e60ccd47b0fbc0fbf543ba1703a2e5c Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Fri, 29 Mar 2019 19:41:50 -0400 Subject: Convince Coverity that s = format (0, ...) is OK Change-Id: Ia88c7228a46e251b8a7815240da6ddbbcde08bc7 Signed-off-by: Dave Barach --- src/vppinfra/format.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; } -- cgit 1.2.3-korg