X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fhelp.c;h=a9a01e7f14a65db8084e5b8cdbdaa6c0ad038c8d;hb=81663f073dbfb4b61c06a0ceb8ca33c4fc41b1c5;hp=6e80571e3b05f00d1017664f3c21457a9b312e4e;hpb=6828df297bdebf234beb347aabcbb1aa596d1212;p=lttng-tools.git diff --git a/src/bin/lttng/commands/help.c b/src/bin/lttng/commands/help.c index 6e80571e3..a9a01e7f1 100644 --- a/src/bin/lttng/commands/help.c +++ b/src/bin/lttng/commands/help.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2015 - Philippe Proulx + * Copyright (C) 2015 Philippe Proulx * - * 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 @@ -20,18 +10,15 @@ #include #include #include -#include #include "../command.h" #include -static const char *help_msg = #ifdef LTTNG_EMBED_HELP +static const char *help_msg = #include -#else -NULL -#endif ; +#endif static const char *lttng_help_msg = #ifdef LTTNG_EMBED_HELP @@ -124,7 +111,7 @@ int cmd_help(int argc, const char **argv, const struct cmd_struct commands[]) /* Show command's help */ cmd_argv[0] = cmd->name; cmd_argv[1] = "--help"; - assert(cmd->func); + LTTNG_ASSERT(cmd->func); ret = cmd->func(2, cmd_argv); end: