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:
0 errors, 1 warnings, 55 lines checked
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* Author: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
*/
+#include "../src/libcgroup-internal.h"
+
#include <stdio.h>
#include <stdlib.h>
-#include "../src/libcgroup-internal.h"
int main(int argc, char *argv[])
{
- int i;
- int ret;
+ char *procname;
pid_t pid;
uid_t uid;
gid_t gid;
- char *procname;
+ int ret;
+ int i;
if (argc < 2) {
printf("Specify process-id.\n");
return 1;
}
- printf(" Pid | Process name | Uid | Gid \n");
+
+ printf(" Pid | Process name | Uid | Gid\n");
printf("-------+----------------------------------+-------+-------\n");
for (i = 1; i < argc; i++) {
printf("%6d | %32s | %5d | %5d\n", pid, procname, uid, gid);
free(procname);
}
+
return 0;
}