]> xenbits.xensource.com Git - xen.git/commitdiff
xmalloc: correct _xmalloc_array() indentation
authorJan Beulich <jbeulich@suse.com>
Fri, 19 May 2017 08:10:49 +0000 (10:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 May 2017 08:10:49 +0000 (10:10 +0200)
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 kicks 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 <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/include/xen/xmalloc.h

index 24a99ac2446c41072853da32dc0f48aad977abeb..cc2673d8aed25e938312d2056d18588d16e82a91 100644 (file)
@@ -33,17 +33,17 @@ extern void *_xzalloc(unsigned long size, unsigned long align);
 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);
 }