From: Kamalesh Babulal Date: Wed, 16 Mar 2022 16:04:27 +0000 (+0530) Subject: samples/logger.c: fix checkpatch.pl warnings X-Git-Tag: v3.0~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2df271ad03adc72e1277f63e5e0b5e5fe90c2d2c;p=thirdparty%2Flibcgroup.git 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 --- 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++) {