diff options
author | Gluster Ant <bugzilla-bot@gluster.org> | 2018-09-12 17:52:45 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2018-09-12 17:52:45 +0530 |
commit | e16868dede6455cab644805af6fe1ac312775e13 (patch) | |
tree | 15aebdb4fff2d87cf8a72f836816b3aa634da58d /tests/bugs/ec | |
parent | 45a71c0548b6fd2c757aa2e7b7671a1411948894 (diff) |
Land part 2 of clang-format changes
Change-Id: Ia84cc24c8924e6d22d02ac15f611c10e26db99b4
Signed-off-by: Nigel Babu <nigelb@redhat.com>
Diffstat (limited to 'tests/bugs/ec')
-rw-r--r-- | tests/bugs/ec/bug-1161886.c | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/tests/bugs/ec/bug-1161886.c b/tests/bugs/ec/bug-1161886.c index 1faae831898..1f12650ea6d 100644 --- a/tests/bugs/ec/bug-1161886.c +++ b/tests/bugs/ec/bug-1161886.c @@ -4,50 +4,50 @@ #include <glusterfs/api/glfs-handles.h> int -main (int argc, char *argv[]) +main(int argc, char *argv[]) { - glfs_t *fs = NULL; - glfs_fd_t *fd = NULL; - int ret = 1; - - if (argc != 4) { - fprintf (stderr, "Syntax: %s <host> <volname> <file>\n", argv[0]); - return 1; - } - - fs = glfs_new (argv[2]); - if (!fs) { - fprintf (stderr, "glfs_new: returned NULL\n"); - return 1; - } - - ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); - if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); - goto out; - } - ret = glfs_set_logging (fs, "/dev/null", 7); - if (ret != 0) { - fprintf (stderr, "glfs_set_logging: returned %d\n", ret); - goto out; - } - ret = glfs_init (fs); - if (ret != 0) { - fprintf (stderr, "glfs_init: returned %d\n", ret); - goto out; - } - - fd = glfs_open (fs, argv[3], O_RDWR | O_TRUNC); - if (fd == NULL) { - fprintf (stderr, "glfs_open: returned NULL\n"); - goto out; - } - glfs_close(fd); - - ret = 0; + glfs_t *fs = NULL; + glfs_fd_t *fd = NULL; + int ret = 1; + + if (argc != 4) { + fprintf(stderr, "Syntax: %s <host> <volname> <file>\n", argv[0]); + return 1; + } + + fs = glfs_new(argv[2]); + if (!fs) { + fprintf(stderr, "glfs_new: returned NULL\n"); + return 1; + } + + ret = glfs_set_volfile_server(fs, "tcp", argv[1], 24007); + if (ret != 0) { + fprintf(stderr, "glfs_set_volfile_server: returned %d\n", ret); + goto out; + } + ret = glfs_set_logging(fs, "/dev/null", 7); + if (ret != 0) { + fprintf(stderr, "glfs_set_logging: returned %d\n", ret); + goto out; + } + ret = glfs_init(fs); + if (ret != 0) { + fprintf(stderr, "glfs_init: returned %d\n", ret); + goto out; + } + + fd = glfs_open(fs, argv[3], O_RDWR | O_TRUNC); + if (fd == NULL) { + fprintf(stderr, "glfs_open: returned NULL\n"); + goto out; + } + glfs_close(fd); + + ret = 0; out: - glfs_fini (fs); + glfs_fini(fs); - return ret; + return ret; } |