From 64ccef75fb90ee1f7a8b64559e76a7572eb56d0e Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Sat, 11 Mar 2017 09:16:34 +0200 Subject: [PATCH] Do not use inline functions for mkdir and rename --- libraries/FS/src/vfs_api.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libraries/FS/src/vfs_api.cpp b/libraries/FS/src/vfs_api.cpp index 1654c98c..ee0774cf 100644 --- a/libraries/FS/src/vfs_api.cpp +++ b/libraries/FS/src/vfs_api.cpp @@ -81,11 +81,6 @@ bool VFSImpl::exists(const char* path) return false; } -static inline int real_rename(const char* f, const char* t) -{ - return rename(f,t); -} - bool VFSImpl::rename(const char* pathFrom, const char* pathTo) { if(!_mountpoint) { @@ -114,7 +109,7 @@ bool VFSImpl::rename(const char* pathFrom, const char* pathTo) } sprintf(temp1,"%s%s", _mountpoint, pathFrom); sprintf(temp2,"%s%s", _mountpoint, pathTo); - auto rc = real_rename(temp1, temp2); + auto rc = ::rename(temp1, temp2); free(temp1); free(temp2); return rc == 0; @@ -153,11 +148,6 @@ bool VFSImpl::remove(const char* path) return rc == 0; } -static inline int real_mkdir(const char* f) -{ - return mkdir(f, ACCESSPERMS); -} - bool VFSImpl::mkdir(const char *path) { if(!_mountpoint) { @@ -182,7 +172,7 @@ bool VFSImpl::mkdir(const char *path) return false; } sprintf(temp,"%s%s", _mountpoint, path); - auto rc = real_mkdir(temp); + auto rc = ::mkdir(temp, ACCESSPERMS); free(temp); return rc == 0; }