aboutsummaryrefslogtreecommitdiffstats
path: root/vppinfra/vppinfra/random_buffer.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-08-15 11:12:27 -0400
committerDave Barach <dave@barachs.net>2016-08-15 11:12:40 -0400
commitc379999665febd12ec55bfb3a7545224f2b39d3d (patch)
tree8bf0c11e52c2162e1239b6c3f4a5f74b62a07409 /vppinfra/vppinfra/random_buffer.c
parentb3d93dacfde8ab21bbce171fff2971b2ed7bce6a (diff)
VPP-327 Coding standards cleanup for vppinfra
Fix additional a few additional deviations reported elsewhere by checkstyle Change-Id: I026a8ae1c5b1856bbe3c4a555e1b690e7501b045 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vppinfra/vppinfra/random_buffer.c')
-rw-r--r--vppinfra/vppinfra/random_buffer.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/vppinfra/vppinfra/random_buffer.c b/vppinfra/vppinfra/random_buffer.c
index 5bcb12345c1..df03698066c 100644
--- a/vppinfra/vppinfra/random_buffer.c
+++ b/vppinfra/vppinfra/random_buffer.c
@@ -38,9 +38,10 @@
#include <vppinfra/random_buffer.h>
/* Fill random buffer. */
-void clib_random_buffer_fill (clib_random_buffer_t * b, uword n_words)
+void
+clib_random_buffer_fill (clib_random_buffer_t * b, uword n_words)
{
- uword * w, n = n_words;
+ uword *w, n = n_words;
if (n < 256)
n = 256;
@@ -48,14 +49,17 @@ void clib_random_buffer_fill (clib_random_buffer_t * b, uword n_words)
n = round_pow2 (n, 2 << ISAAC_LOG2_SIZE);
vec_add2 (b->buffer, w, n);
- do {
- isaac2 (b->ctx, w);
- w += 2 * ISAAC_SIZE;
- n -= 2 * ISAAC_SIZE;
- } while (n > 0);
+ do
+ {
+ isaac2 (b->ctx, w);
+ w += 2 * ISAAC_SIZE;
+ n -= 2 * ISAAC_SIZE;
+ }
+ while (n > 0);
}
-void clib_random_buffer_init (clib_random_buffer_t * b, uword seed)
+void
+clib_random_buffer_init (clib_random_buffer_t * b, uword seed)
{
uword i, j;
@@ -72,3 +76,11 @@ void clib_random_buffer_init (clib_random_buffer_t * b, uword seed)
isaac_init (&b->ctx[i], s);
}
}
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */