Have command_print_summary print nothing if the command summary is NULL.
This allows for a command to be registered, but not documented in the
output of help.
---
 parted/command.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/parted/command.c b/parted/command.c
index 1b84e44..21b6a21 100644
--- a/parted/command.c
+++ b/parted/command.c
@@ -118,6 +118,8 @@ command_get_names (Command** list)
 void
 command_print_summary (Command* cmd)
 {
+        if (cmd->summary == NULL)
+                return;
         fputs ("  ", stdout);
        str_list_print_wrap (cmd->summary, screen_width(), 2, 8, stdout);
        putchar ('\n');
-- 
1.7.10.4


Reply via email to