Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/help.h
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-08-28 21:15:33 +0400
committerJunio C Hamano <gitster@pobox.com>2008-08-29 08:49:55 +0400
commite321180ed3e22120e30bb350a5adecbe959e1241 (patch)
treed262d8693b204942da9326d67501df0124680f13 /help.h
parent63e8aea74e992bd8667e35a0e646110acc1f0d7c (diff)
Remove calculation of the longest command name from where it is not used
Just calculate it where it is needed - it is cheap and trivial, as all the lengths are already there (stored when creating the command lists). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.h')
-rw-r--r--help.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/help.h b/help.h
index 3f1ae89dd6..2733433bf0 100644
--- a/help.h
+++ b/help.h
@@ -16,14 +16,14 @@ static inline void mput_char(char c, unsigned int num)
putchar(c);
}
-unsigned int load_command_list(const char *prefix,
+void load_command_list(const char *prefix,
struct cmdnames *main_cmds,
struct cmdnames *other_cmds);
void add_cmdname(struct cmdnames *cmds, const char *name, int len);
/* Here we require that excludes is a sorted list. */
void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
int is_in_cmdlist(struct cmdnames *c, const char *s);
-void list_commands(const char *title, unsigned int longest,
- struct cmdnames *main_cmds, struct cmdnames *other_cmds);
+void list_commands(const char *title, struct cmdnames *main_cmds,
+ struct cmdnames *other_cmds);
#endif /* HELP_H */