summaryrefslogtreecommitdiff
path: root/src/revparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revparse.c')
-rw-r--r--src/revparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/revparse.c b/src/revparse.c
index dd8476e35..1e6b7101f 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -506,7 +506,7 @@ static int handle_linear_syntax(git_object **out, git_object *obj, const char *m
}
/* "~" is the same as "~1" */
- if (strlen(movement) == 0) {
+ if (*movement == '\0') {
n = 1;
} else {
git__strtol32(&n, movement, NULL, 0);