Commit e1c1ca3c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

util.h: Cleanup, no func changes

Just drop a couple of spaces and
add a comment.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent a722abce
......@@ -87,7 +87,9 @@ extern void printk(const char *format, ...);
} while (0)
#ifndef BUG_ON_HANDLER
#ifdef CR_NOGLIBC
#define BUG_ON_HANDLER(condition) \
do { \
if ((condition)) { \
......@@ -97,7 +99,9 @@ extern void printk(const char *format, ...);
*(unsigned long *)NULL = 0xdead0000 + __LINE__; \
} \
} while (0)
#else
#else /* CR_NOGLIBC */
# define BUG_ON_HANDLER(condition) \
do { \
if ((condition)) { \
......@@ -105,8 +109,10 @@ extern void printk(const char *format, ...);
raise(SIGABRT); \
} \
} while (0)
#endif
#endif
#endif /* CR_NOGLIBC */
#endif /* BUG_ON_HANDLER */
#define BUG_ON(condition) BUG_ON_HANDLER((condition))
......@@ -135,7 +141,8 @@ extern void printk(const char *format, ...);
({ \
size_t rc__ = read(fd, ptr, (size)); \
if (rc__ && rc__ != (size)) { \
pr_err("img corruption %d/%d\n", rc__, (size));\
pr_err("img corruption %d/%d\n", \
rc__, (size)); \
goto err; \
} \
rc__; \
......@@ -161,7 +168,10 @@ extern void printk_vma(struct vma_area *vma_area);
pr_info_vma(vma); \
} while (0)
/* Note while VMA_AREA_NONE we rely on xzalloc */
/*
* Note since VMA_AREA_NONE = 0 we can skip assignment
* here and simply rely on xzalloc
*/
#define alloc_vma_area() \
({ \
struct vma_area *p__ = xzalloc(sizeof(*p__)); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment