summaryrefslogtreecommitdiff
path: root/examples/rev-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rev-list.c')
-rw-r--r--examples/rev-list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rev-list.c b/examples/rev-list.c
index 5c0d751a3..940a01136 100644
--- a/examples/rev-list.c
+++ b/examples/rev-list.c
@@ -22,7 +22,7 @@ int main (int argc, char **argv)
git_repository *repo;
git_revwalk *walk;
git_oid oid;
- char buf[41];
+ char buf[GIT_OID_HEXSZ+1];
git_threads_init();
@@ -32,7 +32,7 @@ int main (int argc, char **argv)
while (!git_revwalk_next(&oid, walk)) {
git_oid_fmt(buf, &oid);
- buf[40] = '\0';
+ buf[GIT_OID_HEXSZ] = '\0';
printf("%s\n", buf);
}