Replace most returns with CHECK_ASSERTION

Also fix some Seek methods return types being unsigned, while returning
negative errors.

Added the CHECK_ASSERTION macro checks in a couple more places.

Simplified CHECK_ASSERTION macro usage.
This commit is contained in:
Raul Tambre 2015-11-08 13:42:41 +02:00
parent 9c2f48cd1d
commit 5d5a4f804b
14 changed files with 159 additions and 394 deletions

View file

@ -10,6 +10,7 @@
#ifndef _WIN32
#include <dirent.h>
#include <errno.h>
#endif
#include "rPlatform.h"
@ -57,14 +58,9 @@ std::string rPlatform::getConfigDir()
dir = "./config";
dir = dir + "/rpcs3/";
s32 ret = mkdir(dir.c_str(), 0777);
if (ret == EEXIST)
if (mkdir(dir.c_str(), 0777) == -1)
{
LOG_WARNING(HLE, "Configuration directory already exists. (%s)", dir);
}
else if (ret < 0)
{
LOG_ERROR(HLE, "An error occured during the creation of the configuration directory. (%d)", ret);
printf("An error occured during the creation of the configuration directory. (%d)", errno);
}
#endif
}