Blame SOURCES/lvm2-2_03_06-cov-ensure-cname-exists-before-derefering-it.patch
|
|
26e710 |
tools/command.c | 6 +++---
|
|
|
26e710 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
26e710 |
|
|
|
26e710 |
diff --git a/tools/command.c b/tools/command.c
|
|
|
26e710 |
index 724040e..2e69eff 100644
|
|
|
26e710 |
--- a/tools/command.c
|
|
|
26e710 |
+++ b/tools/command.c
|
|
|
26e710 |
@@ -1935,7 +1935,7 @@ void print_usage(struct command *cmd, int longhelp, int desc_first)
|
|
|
26e710 |
* see print_common_options_cmd()
|
|
|
26e710 |
*/
|
|
|
26e710 |
|
|
|
26e710 |
- if ((cname->variants > 1) && cname->common_options[opt_enum])
|
|
|
26e710 |
+ if (cname && (cname->variants > 1) && cname->common_options[opt_enum])
|
|
|
26e710 |
continue;
|
|
|
26e710 |
|
|
|
26e710 |
printf("\n\t[");
|
|
|
26e710 |
@@ -1975,7 +1975,7 @@ void print_usage(struct command *cmd, int longhelp, int desc_first)
|
|
|
26e710 |
* see print_common_options_cmd()
|
|
|
26e710 |
*/
|
|
|
26e710 |
|
|
|
26e710 |
- if ((cname->variants > 1) && cname->common_options[opt_enum])
|
|
|
26e710 |
+ if (cname && (cname->variants > 1) && cname->common_options[opt_enum])
|
|
|
26e710 |
continue;
|
|
|
26e710 |
|
|
|
26e710 |
printf("\n\t[");
|
|
|
26e710 |
@@ -3438,7 +3438,7 @@ static int _print_man(char *name, char *des_file, int secondary)
|
|
|
26e710 |
|
|
|
26e710 |
if (!prev_cmd || strcmp(prev_cmd->name, cmd->name)) {
|
|
|
26e710 |
printf(".SH NAME\n");
|
|
|
26e710 |
- if (cname->desc)
|
|
|
26e710 |
+ if (cname && cname->desc)
|
|
|
26e710 |
printf("%s - %s\n", lvmname, cname->desc);
|
|
|
26e710 |
else
|
|
|
26e710 |
printf("%s\n", lvmname);
|