diff options
author | Edward Thomson <ethomson@github.com> | 2016-12-29 12:25:15 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2016-12-29 12:26:03 +0000 |
commit | 909d5494368a00809bc42f4780e86f4dd66e4422 (patch) | |
tree | 637e98589830666f2326b37bcfcfc25dfc773b5a /src/win32/map.c | |
parent | 238b8ccd1aeec0e0d6e50c5050527a8107304bfb (diff) | |
download | libgit2-909d5494368a00809bc42f4780e86f4dd66e4422.tar.gz |
giterr_set: consistent error messages
Error messages should be sentence fragments, and therefore:
1. Should not begin with a capital letter,
2. Should not conclude with punctuation, and
3. Should not end a sentence and begin a new one
Diffstat (limited to 'src/win32/map.c')
-rw-r--r-- | src/win32/map.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/win32/map.c b/src/win32/map.c index 03a3646a6..5fcc1085b 100644 --- a/src/win32/map.c +++ b/src/win32/map.c @@ -67,7 +67,7 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs if (fh == INVALID_HANDLE_VALUE) { errno = EBADF; - giterr_set(GITERR_OS, "Failed to mmap. Invalid handle value"); + giterr_set(GITERR_OS, "failed to mmap. Invalid handle value"); return -1; } @@ -86,13 +86,13 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs if (page_offset != 0) { /* offset must be multiple of the allocation granularity */ errno = EINVAL; - giterr_set(GITERR_OS, "Failed to mmap. Offset must be multiple of allocation granularity"); + giterr_set(GITERR_OS, "failed to mmap. Offset must be multiple of allocation granularity"); return -1; } out->fmh = CreateFileMapping(fh, NULL, fmap_prot, 0, 0, NULL); if (!out->fmh || out->fmh == INVALID_HANDLE_VALUE) { - giterr_set(GITERR_OS, "Failed to mmap. Invalid handle value"); + giterr_set(GITERR_OS, "failed to mmap. Invalid handle value"); out->fmh = NULL; return -1; } @@ -103,7 +103,7 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs off_hi = (DWORD)(page_start >> 32); out->data = MapViewOfFile(out->fmh, view_prot, off_hi, off_low, len); if (!out->data) { - giterr_set(GITERR_OS, "Failed to mmap. No data written"); + giterr_set(GITERR_OS, "failed to mmap. No data written"); CloseHandle(out->fmh); out->fmh = NULL; return -1; @@ -121,7 +121,7 @@ int p_munmap(git_map *map) if (map->data) { if (!UnmapViewOfFile(map->data)) { - giterr_set(GITERR_OS, "Failed to munmap. Could not unmap view of file"); + giterr_set(GITERR_OS, "failed to munmap. Could not unmap view of file"); error = -1; } map->data = NULL; @@ -129,7 +129,7 @@ int p_munmap(git_map *map) if (map->fmh) { if (!CloseHandle(map->fmh)) { - giterr_set(GITERR_OS, "Failed to munmap. Could not close handle"); + giterr_set(GITERR_OS, "failed to munmap. Could not close handle"); error = -1; } map->fmh = NULL; |