From: Josef 'Jeff' Sipek Date: Mon, 20 Nov 2017 14:46:48 +0000 (-0500) Subject: lib: test-path-util - whitespace & coding style cleanup in create_links() X-Git-Tag: 2.3.0.rc1~415 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ee65ee399f701f94adfe40489a87bdf5edca316;p=thirdparty%2Fdovecot%2Fcore.git lib: test-path-util - whitespace & coding style cleanup in create_links() --- diff --git a/src/lib/test-path-util.c b/src/lib/test-path-util.c index f379e03c4d..43b6325adb 100644 --- a/src/lib/test-path-util.c +++ b/src/lib/test-path-util.c @@ -149,30 +149,27 @@ static void test_abspath_vs_normpath(void) static void create_links(const char *tmpdir) { link1 = t_strconcat(tmpdir, "/link1", NULL); - if (symlink(tmpdir, link1) < 0) { - i_fatal("symlink(%s, %s) failed: %m", tmpdir, link1); - } + if (symlink(tmpdir, link1) < 0) + i_fatal("symlink(%s, %s) failed: %m", tmpdir, link1); + const char *link1_child = t_strconcat(link1, "/child", NULL); int fd = creat(link1_child, 0600); if (fd == -1) i_fatal("creat(%s) failed: %m", link1_child); i_close_fd(&fd); - /* link2 and link3 point to each other to create a loop */ - link2 = t_strconcat(tmpdir, "/link2", NULL); - link3 = t_strconcat(tmpdir, "/link3", NULL); - if (symlink(link3, link2) < 0) { - i_fatal("symlink(%s, %s) failed: %m", link3, link2); - } - if (symlink(link2, link3) < 0) { - i_fatal("symlink(%s, %s) failed: %m", link2, link3); - } + /* link2 and link3 point to each other to create a loop */ + link2 = t_strconcat(tmpdir, "/link2", NULL); + link3 = t_strconcat(tmpdir, "/link3", NULL); + if (symlink(link3, link2) < 0) + i_fatal("symlink(%s, %s) failed: %m", link3, link2); + if (symlink(link2, link3) < 0) + i_fatal("symlink(%s, %s) failed: %m", link2, link3); /* link4 points to link1 */ link4 = t_strconcat(tmpdir, "/link4", NULL); - if (symlink("link1", link4) < 0) { - i_fatal("symlink(link1, %s) failed: %m", link4); - } + if (symlink("link1", link4) < 0) + i_fatal("symlink(link1, %s) failed: %m", link4); } static void test_link_alloc(void)