X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftest_urcu_fork.c;h=52ccce756b293ab401c4abb6644b4294c51fe8e5;hb=ce29b37132cef1c1c758e0862ac701e9bb756d29;hp=f61420168b9005c92226760bf2a7c98356de5f77;hpb=ad46005890368f9c306f0c510b3d4b08c47b66f8;p=urcu.git diff --git a/tests/regression/test_urcu_fork.c b/tests/regression/test_urcu_fork.c index f614201..52ccce7 100644 --- a/tests/regression/test_urcu_fork.c +++ b/tests/regression/test_urcu_fork.c @@ -1,27 +1,11 @@ +// SPDX-FileCopyrightText: 2012 Mathieu Desnoyers +// +// SPDX-License-Identifier: GPL-2.0-or-later + /* - * test_urcu_fork.c - * * Userspace RCU library - test program (fork) - * - * Copyright February 2012 - Mathieu Desnoyers - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE -#include "config.h" #include #include #include @@ -30,10 +14,10 @@ #include #include #include -#include #include #include +#include #include #include @@ -90,8 +74,8 @@ static void test_rcu(void) rcu_read_lock(); rcu_read_unlock(); - node = malloc(sizeof(*node)); - assert(node); + node = (struct test_node *) malloc(sizeof(*node)); + urcu_posix_assert(node); call_rcu(&node->head, cb); @@ -165,7 +149,7 @@ static int do_fork(const char *execname) } } -int main(int argc, char **argv) +int main(int argc __attribute__((unused)), char **argv) { unsigned int i;