X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fregenerate.c;h=0e904f8abcba1cdc6c92f6e4b5be3030ba84dac9;hb=81663f073dbfb4b61c06a0ceb8ca33c4fc41b1c5;hp=c53df249285dcd7b5f7010baff0fc35f3e604ce5;hpb=fcf3687f584a8b24b96b71a9ae0bf1028ab677f4;p=lttng-tools.git diff --git a/src/bin/lttng/commands/regenerate.c b/src/bin/lttng/commands/regenerate.c index c53df2492..0e904f8ab 100644 --- a/src/bin/lttng/commands/regenerate.c +++ b/src/bin/lttng/commands/regenerate.c @@ -1,22 +1,11 @@ /* - * Copyright (C) 2015 - Julien Desfossez + * Copyright (C) 2015 Julien Desfossez * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * 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 _LGPL_SOURCE -#include #include #include #include @@ -70,7 +59,7 @@ static int count_arguments(const char **argv) { int i = 0; - assert(argv); + LTTNG_ASSERT(argv); while (argv[i] != NULL) { i++; @@ -127,6 +116,7 @@ static int handle_command(const char **argv) } argc = count_arguments(argv); + LTTNG_ASSERT(argc >= 1); cmd = &actions[i]; while (cmd->func != NULL) {