From: Arshad Hussain Date: Tue, 6 Aug 2019 12:41:52 +0000 (+0530) Subject: LU-6142 tests: Fix style issues for munlink.c X-Git-Tag: 2.12.90~58 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=refs%2Fchanges%2F12%2F35912%2F2 LU-6142 tests: Fix style issues for munlink.c This patch fixes issues reported by checkpatch for file lustre/tests/munlink.c Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: I1722de906c529045fc9a2c8edc877d695840677d Reviewed-on: https://review.whamcloud.com/35912 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Shaun Tancheff Reviewed-by: Petros Koutoupis Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/munlink.c b/lustre/tests/munlink.c index b296bdb..80778a7 100644 --- a/lustre/tests/munlink.c +++ b/lustre/tests/munlink.c @@ -36,27 +36,27 @@ #include #include -int main(int argc, char ** argv) +int main(int argc, char **argv) { - int rc = 0, i; + int rc = 0, i; - if (argc < 2) { - printf("Usage %s filename {filename ...}\n", argv[0]); - return 1; - } + if (argc < 2) { + printf("Usage %s filename {filename ...}\n", argv[0]); + return 1; + } - for (i = 1; i < argc; i++) { - rc = unlink(argv[i]); - if (rc) { - printf("unlink(%s): %s ", argv[i], strerror(errno)); - rc = access(argv[i], F_OK); - if (rc && errno == ENOENT) - printf("(unlinked anyways)\n"); - else if (rc == 0) - printf("(still exists)\n"); - else - printf("(%s looking up)\n", strerror(errno)); - } - } - return rc; + for (i = 1; i < argc; i++) { + rc = unlink(argv[i]); + if (rc) { + printf("unlink(%s): %s ", argv[i], strerror(errno)); + rc = access(argv[i], F_OK); + if (rc && errno == ENOENT) + printf("(unlinked anyways)\n"); + else if (rc == 0) + printf("(still exists)\n"); + else + printf("(%s looking up)\n", strerror(errno)); + } + } + return rc; }