X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=help.c;h=294337e71c0c8f1c3e150dd0b566c04db96c013d;hb=6ea71fe7d36cf5b81c2100d97a822ecf0bc04746;hp=fd87bb5aeec82beec600be46248b19b13bb33804;hpb=f39adc250c3e554c437d027bbc06309a78fd026d;p=git.git diff --git a/help.c b/help.c index fd87bb5ae..294337e71 100644 --- a/help.c +++ b/help.c @@ -100,7 +100,7 @@ static void pretty_print_string_list(struct cmdnames *cmds, int longest) if (space < max_cols) cols = max_cols / space; - rows = (cmds->cnt + cols - 1) / cols; + rows = DIV_ROUND_UP(cmds->cnt, cols); for (i = 0; i < rows; i++) { printf(" "); @@ -302,7 +302,7 @@ const char *help_unknown_cmd(const char *cmd) struct cmdnames main_cmds, other_cmds; memset(&main_cmds, 0, sizeof(main_cmds)); - memset(&other_cmds, 0, sizeof(main_cmds)); + memset(&other_cmds, 0, sizeof(other_cmds)); memset(&aliases, 0, sizeof(aliases)); git_config(git_unknown_cmd_config, NULL); @@ -334,7 +334,7 @@ const char *help_unknown_cmd(const char *cmd) const char *assumed = main_cmds.names[0]->name; main_cmds.names[0] = NULL; clean_cmdnames(&main_cmds); - fprintf(stderr, "WARNING: You called a Git program named '%s', " + fprintf(stderr, "WARNING: You called a Git command named '%s', " "which does not exist.\n" "Continuing under the assumption that you meant '%s'\n", cmd, assumed);