summaryrefslogtreecommitdiff
path: root/notes.h
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-30 17:30:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-02 00:36:06 (GMT)
commit9ef7223058a44990dc4650ecb1209c97ceb636b3 (patch)
treee3aa8240bac2be6a2bf5ad158023ec31a67d3457 /notes.h
parent490bc83a01acfefa11e98f8852b1f4a9dd962331 (diff)
downloadgit-9ef7223058a44990dc4650ecb1209c97ceb636b3.zip
git-9ef7223058a44990dc4650ecb1209c97ceb636b3.tar.gz
git-9ef7223058a44990dc4650ecb1209c97ceb636b3.tar.bz2
notes: make get_note return pointer to struct object_id
Make get_note return a pointer to a const struct object_id. Add a defensive check to ensure we don't accidentally dereference a NULL pointer. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.h')
-rw-r--r--notes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/notes.h b/notes.h
index 6651673..c72bb97 100644
--- a/notes.h
+++ b/notes.h
@@ -140,7 +140,7 @@ int remove_note(struct notes_tree *t, const unsigned char *object_sha1);
*
* Return NULL if the given object has no notes.
*/
-const unsigned char *get_note(struct notes_tree *t,
+const struct object_id *get_note(struct notes_tree *t,
const unsigned char *object_sha1);
/*