Commit 237657f43ef8b95cd22682914aeb4a4285ed6207

Edward Thomson 2020-04-05T17:03:41

map: use GIT_ASSERT

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/map.h b/src/map.h
index 6328d8c..01931d1 100644
--- a/src/map.h
+++ b/src/map.h
@@ -36,9 +36,9 @@ typedef struct { /* memory mapped buffer	*/
 } git_map;
 
 #define GIT_MMAP_VALIDATE(out, len, prot, flags) do { \
-	assert(out != NULL && len > 0); \
-	assert((prot & GIT_PROT_WRITE) || (prot & GIT_PROT_READ)); \
-	assert((flags & GIT_MAP_FIXED) == 0); } while (0)
+	GIT_ASSERT(out != NULL && len > 0); \
+	GIT_ASSERT((prot & GIT_PROT_WRITE) || (prot & GIT_PROT_READ)); \
+	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_munmap(git_map *map);