summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
60eb5d5)
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>
#include <fcntl.h>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
-int main(int argc, char ** argv)
+int main(int argc, char **argv)
- 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;