@@ -14,7 +14,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3) {
1414 /* =============================== TRIGGER SYSCALL ===========================*/
1515
1616 /* Here we scan the parent just to obtain some info for the child */
17- struct proc_info info = {0 };
17+ struct proc_info info = {};
1818 pid_t pid = ::getpid ();
1919 if (!get_proc_info (pid, &info)) {
2020 FAIL () << " Unable to get all the info from proc" << std::endl;
@@ -23,7 +23,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3) {
2323 /* We need to use `SIGCHLD` otherwise the parent won't receive any signal
2424 * when the child terminates. We use `CLONE_FILES` just to test the flags.
2525 */
26- clone_args cl_args = {0 };
26+ clone_args cl_args = {};
2727 cl_args.flags = CLONE_FILES;
2828 cl_args.exit_signal = SIGCHLD;
2929 pid_t ret_pid = syscall (__NR_clone3, &cl_args, sizeof (cl_args));
@@ -122,7 +122,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3_create_child_with_2_threads
122122 pid_t p1_t1 = 61001 ;
123123 pid_t p1_t2 = 61004 ;
124124
125- clone_args cl_args_parent = {0 };
125+ clone_args cl_args_parent = {};
126126 cl_args_parent.set_tid = (uint64_t )&p1_t1;
127127 cl_args_parent.set_tid_size = 1 ;
128128 cl_args_parent.exit_signal = SIGCHLD;
@@ -131,7 +131,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3_create_child_with_2_threads
131131 /* Create a child process that will spawn a new thread */
132132 if (ret_pid == 0 ) {
133133 /* Spawn a new thread */
134- clone_args cl_args_child = {0 };
134+ clone_args cl_args_child = {};
135135 cl_args_child.set_tid = (uint64_t )&p1_t2;
136136 cl_args_child.set_tid_size = 1 ;
137137 /* CLONE_PARENT has no additional effects if we are spawning a thread
@@ -223,14 +223,14 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3_child_clone_parent_flag) {
223223 pid_t p1_t1 = 61024 ;
224224 pid_t p2_t1 = 60128 ;
225225
226- clone_args cl_args_parent = {0 };
226+ clone_args cl_args_parent = {};
227227 cl_args_parent.set_tid = (uint64_t )&p1_t1;
228228 cl_args_parent.set_tid_size = 1 ;
229229 cl_args_parent.exit_signal = SIGCHLD;
230230 pid_t ret_pid = syscall (__NR_clone3, &cl_args_parent, sizeof (cl_args_parent));
231231
232232 if (ret_pid == 0 ) {
233- clone_args cl_args_child = {0 };
233+ clone_args cl_args_child = {};
234234 cl_args_child.set_tid = (uint64_t )&p2_t1;
235235 cl_args_child.set_tid_size = 1 ;
236236 cl_args_child.flags = CLONE_PARENT;
@@ -327,7 +327,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3_child_new_namespace_from_ch
327327
328328 /* Here we create a child process in a new namespace. */
329329 pid_t p1_t1[2 ] = {1 , 61032 };
330- clone_args cl_args = {0 };
330+ clone_args cl_args = {};
331331 cl_args.set_tid = (uint64_t )&p1_t1;
332332 cl_args.set_tid_size = 2 ;
333333 cl_args.flags = CLONE_NEWPID;
@@ -411,7 +411,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3_child_new_namespace_create_
411411 /* Please note that a process can have the same pid number in different namespaces */
412412 pid_t p1_t2[2 ] = {61036 , 61036 };
413413
414- clone_args cl_args = {0 };
414+ clone_args cl_args = {};
415415 cl_args.set_tid = (uint64_t )&p1_t1;
416416 cl_args.set_tid_size = 2 ;
417417 cl_args.flags = CLONE_NEWPID;
@@ -420,7 +420,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone3_child_new_namespace_create_
420420
421421 if (ret_pid == 0 ) {
422422 /* Spawn a new thread */
423- clone_args cl_args_child = {0 };
423+ clone_args cl_args_child = {};
424424 cl_args_child.set_tid = (uint64_t )&p1_t2;
425425 cl_args_child.set_tid_size = 2 ;
426426 cl_args_child.flags = CLONE_THREAD | CLONE_SIGHAND | CLONE_VM | CLONE_VFORK;
@@ -502,7 +502,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_clone) {
502502 /* =============================== TRIGGER SYSCALL ===========================*/
503503
504504 /* Here we scan the parent just to obtain some info for the child */
505- struct proc_info info = {0 };
505+ struct proc_info info = {};
506506 pid_t pid = ::getpid ();
507507 if (!get_proc_info (pid, &info)) {
508508 FAIL () << " Unable to get all the info from proc" << std::endl;
@@ -611,7 +611,7 @@ TEST(GenericTracepoints, sched_proc_fork_case_fork) {
611611 /* =============================== TRIGGER SYSCALL ===========================*/
612612
613613 /* Here we scan the parent just to obtain some info for the child */
614- struct proc_info info = {0 };
614+ struct proc_info info = {};
615615 pid_t pid = ::getpid ();
616616 if (!get_proc_info (pid, &info)) {
617617 FAIL () << " Unable to get all the info from proc" << std::endl;
0 commit comments