Commit c5bd70d13843cc213ec57b10168dd94ed362843b

Patrick Steinhardt 2016-02-23T11:48:30

revwalk: use GITERR_CHECK_ALLOC_BUF

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/revwalk.c b/src/revwalk.c
index 89279ed..4815a10 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -223,8 +223,7 @@ static int push_glob(git_revwalk *walk, const char *glob, int hide)
 		git_buf_joinpath(&buf, GIT_REFS_DIR, glob);
 	else
 		git_buf_puts(&buf, glob);
-	if (git_buf_oom(&buf))
-		return -1;
+	GITERR_CHECK_ALLOC_BUF(&buf);
 
 	/* If no '?', '*' or '[' exist, we append '/ *' to the glob */
 	wildcard = strcspn(glob, "?*[");