Whamcloud - gitweb
LU-6142 tests: Fix style issues for munlink.c 12/35912/2
authorArshad Hussain <arshad.super@gmail.com>
Tue, 6 Aug 2019 12:41:52 +0000 (18:11 +0530)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Oct 2019 03:43:52 +0000 (03:43 +0000)
This patch fixes issues reported by checkpatch
for file lustre/tests/munlink.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I1722de906c529045fc9a2c8edc877d695840677d
Reviewed-on: https://review.whamcloud.com/35912
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/munlink.c

index b296bdb..80778a7 100644 (file)
 #include <fcntl.h>
 #include <unistd.h>
 
-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;
 }