X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=doc%2Fexamples%2Furcu-flavors%2Fmb.c;h=7069c248fef60a538d6f3623ccc87771e8d34d1a;hb=81270292c23ff28aba1abd9a65f0624b657de82b;hp=e103e4f91f55f1d69078733136366d05145194a7;hpb=b9050d917ab84db192b5609ba6dd9973a82d215a;p=urcu.git diff --git a/doc/examples/urcu-flavors/mb.c b/doc/examples/urcu-flavors/mb.c index e103e4f..7069c24 100644 --- a/doc/examples/urcu-flavors/mb.c +++ b/doc/examples/urcu-flavors/mb.c @@ -1,20 +1,6 @@ -/* - * Copyright (C) 2013 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ +// SPDX-FileCopyrightText: 2013 Mathieu Desnoyers +// +// SPDX-License-Identifier: LGPL-2.1-or-later #include #include @@ -47,7 +33,7 @@ int add_node(uint64_t v) { struct mynode *node; - node = calloc(sizeof(*node), 1); + node = calloc(1, sizeof(*node)); if (!node) return -1; node->value = v; @@ -63,7 +49,7 @@ void rcu_free_node(struct rcu_head *rh) free(node); } -int main(int argc, char **argv) +int main(void) { uint64_t values[] = { 42, 36, 24, }; unsigned int i;