diff options
Diffstat (limited to 'cli/src/registry.c')
| -rw-r--r-- | cli/src/registry.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/cli/src/registry.c b/cli/src/registry.c index bab44cd89..c4abe3be0 100644 --- a/cli/src/registry.c +++ b/cli/src/registry.c @@ -1,22 +1,12 @@ /* - Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS 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 - Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ + Copyright (c) 2010-2012 Red Hat, Inc. <http://www.redhat.com> + This file is part of GlusterFS. + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ #ifndef _CONFIG_H #define _CONFIG_H @@ -268,7 +258,7 @@ cli_getunamb (const char *tok, void **choices, cli_selector_t sel) unsigned mn = 0; void *ret = NULL; - if (!choices || !*tok) + if (!choices || !tok || !*tok) return NULL; for (wcon = choices; *wcon; wcon++) { @@ -387,7 +377,7 @@ cli_cmd_register (struct cli_cmd_tree *tree, struct cli_cmd *cmd) char **tokens = NULL; int ret = 0; - GF_ASSERT (cmd) + GF_ASSERT (cmd); if (cmd->reg_cbk) cmd->reg_cbk (cmd); |
