summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-refs.c
diff options
context:
space:
mode:
authorMathnerd314 <mathnerd314.gph+hs@gmail.com>2016-06-18 10:31:19 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2016-06-22 16:10:01 +0000
commit4cb77c51db5096eea19b82c30f7bb09434a620e0 (patch)
treea824c332644f76663ccf8b210e2636c158582582 /src/libostree/ostree-repo-refs.c
parent91ccaff197ddefebe4965108ed19735bcbb6bfd3 (diff)
downloadostree-4cb77c51db5096eea19b82c30f7bb09434a620e0.tar.gz
core: Use OSTREE_SHA256_STRING_LEN instead of 64
Closes: #359 Approved by: cgwalters
Diffstat (limited to 'src/libostree/ostree-repo-refs.c')
-rw-r--r--src/libostree/ostree-repo-refs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libostree/ostree-repo-refs.c b/src/libostree/ostree-repo-refs.c
index d9af2256..1eb50e0c 100644
--- a/src/libostree/ostree-repo-refs.c
+++ b/src/libostree/ostree-repo-refs.c
@@ -341,10 +341,10 @@ ostree_repo_resolve_partial_checksum (OstreeRepo *self,
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- /* If the input is longer than 64 chars or contains non-hex chars,
+ /* If the input is longer than OSTREE_SHA256_STRING_LEN chars or contains non-hex chars,
don't bother looking for it as an object */
off = strspn (refspec, hexchars);
- if (off > 64 || refspec[off] != '\0')
+ if (off > OSTREE_SHA256_STRING_LEN || refspec[off] != '\0')
return TRUE;
/* this looks through all objects and adds them to the ref_list if:
@@ -740,7 +740,7 @@ ostree_repo_remote_list_refs (OstreeRepo *self,
{
const char *ref_name = NULL;
g_autoptr(GVariant) csum_v = NULL;
- char tmp_checksum[65];
+ char tmp_checksum[OSTREE_SHA256_STRING_LEN+1];
g_variant_get_child (child, 0, "&s", &ref_name);