Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
quic: disable vnet_crypto and batching if no crypto engines are loaded
[vpp.git]
/
src
/
vppinfra
/
format.c
diff --git
a/src/vppinfra/format.c
b/src/vppinfra/format.c
index
70292c0
..
cb6cb45
100644
(file)
--- a/
src/vppinfra/format.c
+++ b/
src/vppinfra/format.c
@@
-139,13
+139,13
@@
justify (u8 * s, format_info_t * fi, uword s_len_orig)
if (n_left > 0)
{
vec_insert (s, n_left, i0);
if (n_left > 0)
{
vec_insert (s, n_left, i0);
- memset (s + i0, fi->pad_char, n_left);
+
clib_
memset (s + i0, fi->pad_char, n_left);
l1 = vec_len (s);
}
if (n_right > 0)
{
vec_resize (s, n_right);
l1 = vec_len (s);
}
if (n_right > 0)
{
vec_resize (s, n_right);
- memset (s + l1, fi->pad_char, n_right);
+
clib_
memset (s + l1, fi->pad_char, n_right);
}
}
return s;
}
}
return s;
@@
-412,6
+412,11
@@
va_format (u8 * s, const char *fmt, va_list * va)
if (f > g)
vec_add (s, g, f - g);
if (f > g)
vec_add (s, g, f - g);
+#ifdef __COVERITY__
+ if (s == 0)
+ return (u8 *) "liar liar pants on fire s can't be zero!";
+#endif
+
return s;
}
return s;
}
@@
-422,6
+427,10
@@
format (u8 * s, const char *fmt, ...)
va_start (va, fmt);
s = va_format (s, fmt, &va);
va_end (va);
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;
}
return s;
}
@@
-463,6
+472,17
@@
fformat (FILE * f, char *fmt, ...)
}
#ifdef CLIB_UNIX
}
#ifdef CLIB_UNIX
+void
+fformat_append_cr (FILE * ofp, const char *fmt, ...)
+{
+ va_list va;
+
+ va_start (va, fmt);
+ (void) va_fformat (ofp, (char *) fmt, &va);
+ va_end (va);
+ fformat (ofp, "\n");
+}
+
word
fdformat (int fd, char *fmt, ...)
{
word
fdformat (int fd, char *fmt, ...)
{