From 1b5e69dcac447dfe015d207e1254a023d011ec1e Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Wed, 9 Mar 2022 12:41:03 +0530 Subject: [PATCH] src/abstraction-common.h: fix checkpatch.pl warnings Fix all of the warnings/errors reported by Linux Kernel's checkpatch.pl, except SPDX_LICENSE_TAG, USE_NEGATIVE_ERRNO types. It also introduces reverse xmas tree local variable declarations and header file reordering. In summary, this patch fixes the following checkpatch.pl recommendations: total: 0 errors, 4 warnings, 150 lines checked Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- src/abstraction-common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/abstraction-common.h b/src/abstraction-common.h index 960d1575..efe8f186 100644 --- a/src/abstraction-common.h +++ b/src/abstraction-common.h @@ -26,6 +26,7 @@ extern "C" { #endif #include "config.h" + #include #include "libcgroup-internal.h" @@ -37,11 +38,11 @@ extern "C" { * @param out_value Pointer to hold the output long value * * @return 0 on success, - * ECGFAIL if the conversion to long failed, - * ECGINVAL upon an invalid parameter + * ECGFAIL if the conversion to long failed, + * ECGINVAL upon an invalid parameter */ int cgroup_strtol(const char * const in_str, int base, - long int * const out_value); + long * const out_value); /** * Convert an integer setting to another integer setting -- 2.47.2