diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-04-05 19:14:35 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-11-27 11:09:21 +0000 |
| commit | 9cd6481e5ded04dba277925e6084f0d84ad537a8 (patch) | |
| tree | 9d3db5b3b06b224e2a758c2968be8c2e60f84ce0 | |
| parent | 9502f8e9fe69635a3e8636b0413ab23c9a6cf07d (diff) | |
| download | libgit2-9cd6481e5ded04dba277925e6084f0d84ad537a8.tar.gz | |
posix: use GIT_ASSERT
| -rw-r--r-- | src/posix.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/posix.c b/src/posix.c index fbaa7c3ca..9cd96d2c8 100644 --- a/src/posix.c +++ b/src/posix.c @@ -129,7 +129,8 @@ int p_getcwd(char *buffer_out, size_t size) { char *cwd_buffer; - assert(buffer_out && size > 0); + GIT_ASSERT_ARG(buffer_out); + GIT_ASSERT_ARG(size > 0); cwd_buffer = getcwd(buffer_out, size); @@ -196,7 +197,7 @@ int p_write(git_file fd, const void *buf, size_t cnt) while (cnt) { ssize_t r; #ifdef GIT_WIN32 - assert((size_t)((unsigned int)cnt) == cnt); + GIT_ASSERT((size_t)((unsigned int)cnt) == cnt); r = write(fd, b, (unsigned int)cnt); #else r = write(fd, b, cnt); @@ -263,7 +264,7 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, off64_t offset int p_munmap(git_map *map) { - assert(map != NULL); + GIT_ASSERT_ARG(map); git__free(map->data); return 0; |
