diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2010-12-05 20:18:56 +0100 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2010-12-05 20:18:56 +0100 |
| commit | 6f02c3bad8f563036b9d2035e656bcb847d4c292 (patch) | |
| tree | bd0e705257b18beb5016876a719940de1e431bbd /src/fileops.c | |
| parent | d3e2dd5ea174cb14905a5ab48e3b97bcf9f0b97e (diff) | |
| download | libgit2-6f02c3bad8f563036b9d2035e656bcb847d4c292.tar.gz | |
Small source code readability improvements.
Replaced magic number "0" with GIT_SUCCESS constant wherever it made sense.
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fileops.c b/src/fileops.c index 210e7d6e7..ea9935ab1 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -151,7 +151,7 @@ int gitfo_move_file(char *from, char *to) int gitfo_map_ro(git_map *out, git_file fd, off_t begin, size_t len) { - if (git__mmap(out, len, GIT_PROT_READ, GIT_MAP_SHARED, fd, begin) < 0) + if (git__mmap(out, len, GIT_PROT_READ, GIT_MAP_SHARED, fd, begin) < GIT_SUCCESS) return git_os_error(); return GIT_SUCCESS; } @@ -240,7 +240,7 @@ int gitfo_close_cached(gitfo_cache *ioc) { git_file fd; - if (gitfo_flush_cached(ioc) < 0) + if (gitfo_flush_cached(ioc) < GIT_SUCCESS) return GIT_ERROR; fd = ioc->fd; @@ -292,7 +292,7 @@ int gitfo_dirent( strcpy(path + wd_len, de->d_name); result = fn(arg, path); - if (result < 0) { + if (result < GIT_SUCCESS) { closedir(dir); return result; } |
