aboutsummaryrefslogtreecommitdiffstats
path: root/vppinfra/vppinfra/fheap.h
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/fheap.h
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/fheap.h')
-rw-r--r--vppinfra/vppinfra/fheap.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/vppinfra/vppinfra/fheap.h b/vppinfra/vppinfra/fheap.h
index 974eb1fc698..6d4965f1bea 100644
--- a/vppinfra/vppinfra/fheap.h
+++ b/vppinfra/vppinfra/fheap.h
@@ -20,7 +20,8 @@
#include <vppinfra/vec.h>
-typedef struct {
+typedef struct
+{
/* Node index of parent. */
u32 parent;
@@ -67,13 +68,14 @@ do { \
} \
} while (0)
-typedef struct {
+typedef struct
+{
u32 min_root;
/* Vector of nodes. */
- fheap_node_t * nodes;
+ fheap_node_t *nodes;
- u32 * root_list_by_rank;
+ u32 *root_list_by_rank;
u32 enable_validate;
@@ -84,8 +86,8 @@ typedef struct {
always_inline void
fheap_init (fheap_t * f, u32 n_nodes)
{
- fheap_node_t * save_nodes = f->nodes;
- u32 * save_root_list = f->root_list_by_rank;
+ fheap_node_t *save_nodes = f->nodes;
+ u32 *save_root_list = f->root_list_by_rank;
memset (f, 0, sizeof (f[0]));
@@ -107,11 +109,15 @@ fheap_free (fheap_t * f)
always_inline u32
fheap_find_min (fheap_t * f)
-{ return f->min_root; }
+{
+ return f->min_root;
+}
always_inline u32
fheap_is_empty (fheap_t * f)
-{ return f->min_root == ~0; }
+{
+ return f->min_root == ~0;
+}
/* Add/delete nodes. */
void fheap_add (fheap_t * f, u32 ni, u32 key);
@@ -124,3 +130,11 @@ u32 fheap_del_min (fheap_t * f, u32 * min_key);
void fheap_decrease_key (fheap_t * f, u32 ni, u32 new_key);
#endif /* included_clib_fheap_h */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */