Commit 04c3b35f9c90fb93390c0198bc1a8123ca13e081

Edward Thomson 2016-02-23T13:02:07

map: use `giterr_set` internally Use the `giterr_set` function, which actually supports `GITERR_OS`. The `giterr_set_str` function is exposed for external users and will not append the operating system's error message.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/unix/map.c b/src/unix/map.c
index 87ee659..72abb34 100644
--- a/src/unix/map.c
+++ b/src/unix/map.c
@@ -17,7 +17,7 @@ int git__page_size(size_t *page_size)
 {
 	long sc_page_size = sysconf(_SC_PAGE_SIZE);
 	if (sc_page_size < 0) {
-		giterr_set_str(GITERR_OS, "Can't determine system page size");
+		giterr_set(GITERR_OS, "can't determine system page size");
 		return -1;
 	}
 	*page_size = (size_t) sc_page_size;