It's been wrongly indented using tabs till now, and the stray blank
ahead of the final return statement gets in the way of using .i files
for detailed analysis of other compiler issues
(-Wmisleading-indentation kickin in due to the tab->space
transformation done in the course of pre-processing).

Also add missing spaces inside the if() at once, including the similar
case in _xzalloc_array().

Signed-off-by: Jan Beulich <[email protected]>

--- a/xen/include/xen/xmalloc.h
+++ b/xen/include/xen/xmalloc.h
@@ -33,17 +33,17 @@ extern void *_xzalloc(unsigned long size
 static inline void *_xmalloc_array(
     unsigned long size, unsigned long align, unsigned long num)
 {
-       /* Check for overflow. */
-       if (size && num > UINT_MAX / size)
-               return NULL;
-       return _xmalloc(size * num, align);
+    /* Check for overflow. */
+    if ( size && num > UINT_MAX / size )
+        return NULL;
+    return _xmalloc(size * num, align);
 }
 
 static inline void *_xzalloc_array(
     unsigned long size, unsigned long align, unsigned long num)
 {
     /* Check for overflow. */
-    if (size && num > UINT_MAX / size)
+    if ( size && num > UINT_MAX / size )
         return NULL;
     return _xzalloc(size * num, align);
 }



xmalloc: correct _xmalloc_array() indentation

It's been wrongly indented using tabs till now, and the stray blank
ahead of the final return statement gets in the way of using .i files
for detailed analysis of other compiler issues
(-Wmisleading-indentation kickin in due to the tab->space
transformation done in the course of pre-processing).

Also add missing spaces inside the if() at once, including the similar
case in _xzalloc_array().

Signed-off-by: Jan Beulich <[email protected]>

--- a/xen/include/xen/xmalloc.h
+++ b/xen/include/xen/xmalloc.h
@@ -33,17 +33,17 @@ extern void *_xzalloc(unsigned long size
 static inline void *_xmalloc_array(
     unsigned long size, unsigned long align, unsigned long num)
 {
-       /* Check for overflow. */
-       if (size && num > UINT_MAX / size)
-               return NULL;
-       return _xmalloc(size * num, align);
+    /* Check for overflow. */
+    if ( size && num > UINT_MAX / size )
+        return NULL;
+    return _xmalloc(size * num, align);
 }
 
 static inline void *_xzalloc_array(
     unsigned long size, unsigned long align, unsigned long num)
 {
     /* Check for overflow. */
-    if (size && num > UINT_MAX / size)
+    if ( size && num > UINT_MAX / size )
         return NULL;
     return _xzalloc(size * num, align);
 }
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reply via email to