int ret;
const int file_flags = O_WRONLY | O_CREAT | O_TRUNC;
const mode_t file_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
- char *branch_name = NULL;
+ char *branch_name = nullptr;
ret = asprintf(&branch_name, "%s/%s", test_root_name, "a/b/c/d");
if (ret < 0) {
const char *test_root_name)
{
int ret;
- char *file_name = NULL;
+ char *file_name = nullptr;
ret = asprintf(&file_name, "%s/%s", test_root_name, "a/b/e/file1");
if (ret < 0) {
{
int ret, tests_ran = 0;
struct lttng_directory_handle *test_dir_handle;
- char *created_dir = NULL;
+ char *created_dir = nullptr;
const char test_root_name[] = "fail_non_empty";
- char *test_dir_path = NULL;
+ char *test_dir_path = nullptr;
diag("rmdir (fail if non-empty)");
{
int ret, tests_ran = 0;
struct lttng_directory_handle *test_dir_handle;
- char *created_dir = NULL;
+ char *created_dir = nullptr;
const char test_root_name[] = "skip_non_empty";
- char *test_dir_path = NULL;
+ char *test_dir_path = nullptr;
diag("rmdir (skip if non-empty)");
return ret == 0 ? tests_ran : ret;
}
-int main(void)
+int main()
{
int ret;
char test_dir[] = "/tmp/lttng-XXXXXX";