clang-format

This commit is contained in:
2024-09-10 13:03:02 -04:00
parent 53c617d779
commit d66450e427
381 changed files with 28864 additions and 34170 deletions

View File

@@ -36,53 +36,42 @@
#include "test.h"
static
void
link_dir(void)
{
int rv;
static void link_dir(void) {
int rv;
report_begin("hard link of .");
rv = link(".", TESTDIR);
report_check(rv, errno, EINVAL);
if (rv==0) {
/* this might help recover... maybe */
remove(TESTDIR);
}
report_begin("hard link of .");
rv = link(".", TESTDIR);
report_check(rv, errno, EINVAL);
if (rv == 0) {
/* this might help recover... maybe */
remove(TESTDIR);
}
}
static
void
link_empty1(void)
{
int rv;
static void link_empty1(void) {
int rv;
report_begin("hard link of empty string");
rv = link("", TESTDIR);
report_check(rv, errno, EINVAL);
report_begin("hard link of empty string");
rv = link("", TESTDIR);
report_check(rv, errno, EINVAL);
}
static
void
link_empty2(void)
{
int rv;
static void link_empty2(void) {
int rv;
report_begin("hard link to empty string");
if (create_testdir()<0) {
/*report_aborted();*/ /* XXX in create_testdir */
return;
}
rv = link(TESTDIR, "");
report_check(rv, errno, EINVAL);
rmdir(TESTDIR);
report_begin("hard link to empty string");
if (create_testdir() < 0) {
/*report_aborted();*/ /* XXX in create_testdir */
return;
}
rv = link(TESTDIR, "");
report_check(rv, errno, EINVAL);
rmdir(TESTDIR);
}
void
test_link(void)
{
test_link_paths();
link_dir();
link_empty1();
link_empty2();
void test_link(void) {
test_link_paths();
link_dir();
link_empty1();
link_empty2();
}