mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
lvmcmdline: check for NULL
Althought this code likely never is hit with NULL, just add check to be sure.
This commit is contained in:
parent
c0e7cdff9d
commit
af983ad3d3
@ -1993,7 +1993,7 @@ static void _short_usage(const char *name)
|
|||||||
static int _usage(const char *name, int longhelp, int skip_notes)
|
static int _usage(const char *name, int longhelp, int skip_notes)
|
||||||
{
|
{
|
||||||
const struct command_name *cname = find_command_name(name);
|
const struct command_name *cname = find_command_name(name);
|
||||||
const struct command_name_args *cna = &command_names_args[cname->lvm_command_enum];
|
const struct command_name_args *cna = cname ? &command_names_args[cname->lvm_command_enum] : NULL;
|
||||||
struct command *cmd = NULL;
|
struct command *cmd = NULL;
|
||||||
int show_full = longhelp;
|
int show_full = longhelp;
|
||||||
int i;
|
int i;
|
||||||
|
Loading…
Reference in New Issue
Block a user