]> git.proxmox.com Git - libgit2.git/commitdiff
map: use `giterr_set` internally
authorEdward Thomson <ethomson@github.com>
Tue, 23 Feb 2016 18:02:07 +0000 (13:02 -0500)
committerEdward Thomson <ethomson@github.com>
Tue, 23 Feb 2016 18:08:50 +0000 (13:08 -0500)
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.

src/unix/map.c

index 87ee6594b963c9ada5ef195f6f89c4ac19336491..72abb3418d75fc7e0541c3fadda4d8673eb699bc 100644 (file)
@@ -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;