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>
diff --git a/vppinfra/vppinfra/vm_unix.h b/vppinfra/vppinfra/vm_unix.h
index 80e0595..07e8651 100644
--- a/vppinfra/vppinfra/vm_unix.h
+++ b/vppinfra/vppinfra/vm_unix.h
@@ -42,9 +42,10 @@
#include <sys/mman.h>
/* Allocate virtual address space. */
-always_inline void * clib_mem_vm_alloc (uword size)
+always_inline void *
+clib_mem_vm_alloc (uword size)
{
- void * mmap_addr;
+ void *mmap_addr;
uword flags = MAP_PRIVATE;
#ifdef MAP_ANONYMOUS
@@ -58,12 +59,16 @@
return mmap_addr;
}
-always_inline void clib_mem_vm_free (void * addr, uword size)
-{ munmap (addr, size); }
-
-always_inline void * clib_mem_vm_unmap (void * addr, uword size)
+always_inline void
+clib_mem_vm_free (void *addr, uword size)
{
- void * mmap_addr;
+ munmap (addr, size);
+}
+
+always_inline void *
+clib_mem_vm_unmap (void *addr, uword size)
+{
+ void *mmap_addr;
uword flags = MAP_PRIVATE | MAP_FIXED;
/* To unmap we "map" with no protection. If we actually called
@@ -77,9 +82,10 @@
return mmap_addr;
}
-always_inline void * clib_mem_vm_map (void * addr, uword size)
+always_inline void *
+clib_mem_vm_map (void *addr, uword size)
{
- void * mmap_addr;
+ void *mmap_addr;
uword flags = MAP_PRIVATE | MAP_FIXED;
mmap_addr = mmap (addr, size, (PROT_READ | PROT_WRITE), flags, -1, 0);
@@ -90,3 +96,11 @@
}
#endif /* included_vm_unix_h */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */