cleanup function signatures and definitions

This commit is contained in:
Antonio SJ Musumeci 2020-08-16 18:22:25 -04:00
parent 6cc6524997
commit ec15872a1f
112 changed files with 743 additions and 820 deletions

View file

@ -48,7 +48,7 @@ generate_tmp_path(const string &base_)
namespace fs
{
int
mktemp(string &base_,
mktemp(string *base_,
const int flags_)
{
int fd;
@ -61,13 +61,13 @@ namespace fs
flags = (flags_ | O_EXCL | O_CREAT);
while(count-- > 0)
{
tmppath = generate_tmp_path(base_);
tmppath = generate_tmp_path(*base_);
fd = fs::open(tmppath,flags,S_IWUSR);
if((fd == -1) && (errno == EEXIST))
continue;
else if(fd != -1)
base_ = tmppath;
*base_ = tmppath;
return fd;
}