From 2df271ad03adc72e1277f63e5e0b5e5fe90c2d2c Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Wed, 16 Mar 2022 21:34:27 +0530 Subject: [PATCH] samples/logger.c: fix checkpatch.pl warnings Fix all of the warnings/errors reported by Linux Kernel's checkpatch.pl, except SPDX_LICENSE_TAG. 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, 0 warnings, 53 lines checked Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- samples/c/logger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/c/logger.c b/samples/c/logger.c index 29462908..cdadf647 100644 --- a/samples/c/logger.c +++ b/samples/c/logger.c @@ -10,6 +10,7 @@ #include "config.h" #include "libcgroup.h" #include "../src/libcgroup-internal.h" + #include #include @@ -21,8 +22,8 @@ static void mylogger(void *userdata, int loglevel, const char *fmt, va_list ap) int main(int argc, char **argv) { - int custom = 0; int loglevel = -1; + int custom = 0; int i; for (i = 1; i < argc; i++) { -- 2.47.2