summaryrefslogtreecommitdiff
path: root/src/transports
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 /src/transports
parent3a495c19bd280f5455047a9ac0e936f2c2f2f9a9 (diff)
downloadlibgit2-3b2cb2c91ee77e5e45957e8355025e3e742c07bd.tar.gz
Factor 40 and 41 constants from source.
Diffstat (limited to 'src/transports')
-rw-r--r--src/transports/smart_protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c
index 5ca5065ac..7c20382dc 100644
--- a/src/transports/smart_protocol.c
+++ b/src/transports/smart_protocol.c
@@ -640,9 +640,9 @@ static int gen_pktline(git_buf *buf, git_push *push)
{
push_spec *spec;
size_t i, len;
- char old_id[41], new_id[41];
+ char old_id[GIT_OID_HEXSZ+1], new_id[GIT_OID_HEXSZ+1];
- old_id[40] = '\0'; new_id[40] = '\0';
+ old_id[GIT_OID_HEXSZ] = '\0'; new_id[GIT_OID_HEXSZ] = '\0';
git_vector_foreach(&push->specs, i, spec) {
len = 2*GIT_OID_HEXSZ + 7 + strlen(spec->rref);
@@ -963,7 +963,7 @@ int git_smart__push(git_transport *transport, git_push *push)
#ifdef PUSH_DEBUG
{
git_remote_head *head;
- char hex[41]; hex[40] = '\0';
+ char hex[GIT_OID_HEXSZ+1]; hex[GIT_OID_HEXSZ] = '\0';
git_vector_foreach(&push->remote->refs, i, head) {
git_oid_fmt(hex, &head->oid);