X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-log.c;h=911fd659906ebe87bf0adcd17519dd97777fb948;hb=d36f8679e94c2a0d4d15d6adcea434634af6d627;hp=617aa67f2b2d1fd82c34eea62fd73145ff646ae0;hpb=e75bf76f5462af4185d8260f6feecf24dd24a516;p=git.git diff --git a/builtin-log.c b/builtin-log.c index 617aa67f2..911fd6599 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -461,7 +461,7 @@ static int extra_cc_alloc; static void add_header(const char *value) { int len = strlen(value); - while (value[len - 1] == '\n') + while (len && value[len - 1] == '\n') len--; if (!strncasecmp(value, "to: ", 4)) { ALLOC_GROW(extra_to, extra_to_nr + 1, extra_to_alloc); @@ -1082,7 +1082,7 @@ static int add_pending_commit(const char *arg, struct rev_info *revs, int flags) } static const char cherry_usage[] = -"git-cherry [-v] [] []"; +"git cherry [-v] [] []"; int cmd_cherry(int argc, const char **argv, const char *prefix) { struct rev_info revs;