summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-shortlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index f1124e261b..7a2ddfe797 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -188,7 +188,7 @@ static void read_from_stdin(struct path_list *list)
bob = buffer + strlen(buffer);
else {
offset = 8;
- while (isspace(bob[-1]))
+ if (isspace(bob[-1]))
bob--;
}
@@ -236,7 +236,7 @@ static void get_from_rev(struct rev_info *rev, struct path_list *list)
author = scratch;
authorlen = strlen(scratch);
} else {
- while (bracket[-1] == ' ')
+ if (bracket[-1] == ' ')
bracket--;
author = buffer + 7;