From 9ef7223058a44990dc4650ecb1209c97ceb636b3 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 30 May 2017 10:30:40 -0700 Subject: 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 Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- notes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'notes.h') diff --git a/notes.h b/notes.h index 6651673ae1..c72bb97106 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); /* -- cgit v1.2.3