Commit 237657f4 by Edward Thomson

map: use GIT_ASSERT

parent 23e38fd3
...@@ -36,9 +36,9 @@ typedef struct { /* memory mapped buffer */ ...@@ -36,9 +36,9 @@ typedef struct { /* memory mapped buffer */
} git_map; } git_map;
#define GIT_MMAP_VALIDATE(out, len, prot, flags) do { \ #define GIT_MMAP_VALIDATE(out, len, prot, flags) do { \
assert(out != NULL && len > 0); \ GIT_ASSERT(out != NULL && len > 0); \
assert((prot & GIT_PROT_WRITE) || (prot & GIT_PROT_READ)); \ GIT_ASSERT((prot & GIT_PROT_WRITE) || (prot & GIT_PROT_READ)); \
assert((flags & GIT_MAP_FIXED) == 0); } while (0) GIT_ASSERT((flags & GIT_MAP_FIXED) == 0); } while (0)
extern int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, off64_t offset); extern int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, off64_t offset);
extern int p_munmap(git_map *map); extern int p_munmap(git_map *map);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment