summaryrefslogtreecommitdiff
path: root/examples/rev-list.c
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-09-16 11:49:25 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-09-16 13:07:04 +0200
commit3b2cb2c91ee77e5e45957e8355025e3e742c07bd (patch)
tree01213a03d821babf6103754afe64fed6e9849a6f /examples/rev-list.c
parent3a495c19bd280f5455047a9ac0e936f2c2f2f9a9 (diff)
downloadlibgit2-3b2cb2c91ee77e5e45957e8355025e3e742c07bd.tar.gz
Factor 40 and 41 constants from source.
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);
}