summaryrefslogtreecommitdiff
path: root/src/fileops.h
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-14 17:36:15 -0700
committerRussell Belfer <arrbee@arrbee.com>2012-03-14 17:36:15 -0700
commitdeafee7bd7a9e2efcdff90627b6094d8c1519319 (patch)
tree4b11910d7d315a6db667cc4af4c6749630612ed3 /src/fileops.h
parentab43ad2fd822504446e7876d6352c968a74beb53 (diff)
downloadlibgit2-deafee7bd7a9e2efcdff90627b6094d8c1519319.tar.gz
Continue error conversion
This converts blob.c, fileops.c, and all of the win32 files. Also, various minor cleanups throughout the code. Plus, in testing the win32 build, I cleaned up a bunch (although not all) of the warnings with the 64-bit build.
Diffstat (limited to 'src/fileops.h')
-rw-r--r--src/fileops.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/fileops.h b/src/fileops.h
index c2ba8ffc8..6df565321 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -77,18 +77,9 @@ extern int git_futils_mktmp(git_buf *path_out, const char *filename);
extern int git_futils_mv_withpath(const char *from, const char *to, const mode_t dirmode);
/**
- * Open a file readonly and set error if needed
- */
-GIT_INLINE(int) git_futils_open_ro(const char *path)
-{
- int fd = p_open(path, O_RDONLY);
- if (fd < 0) {
- if (errno == ENOENT)
- fd = GIT_ENOTFOUND;
- giterr_set(GITERR_OS, "Failed to open '%s'", path);
- }
- return fd;
-}
+ * Open a file readonly and set error if needed.
+ */
+extern int git_futils_open_ro(const char *path);
/**
* Get the filesize in bytes of a file