(Apple) Style nits

This commit is contained in:
Twinaphex 2015-04-07 20:51:47 +02:00
parent e836691a20
commit 4bc43fae53

View File

@ -71,13 +71,16 @@ static bool CopyModel(char** model, uint32_t *majorRev, uint32_t *minorRev)
}
modelLen = strcspn(machineModel, "0123456789");
if (modelLen == 0)
{
RARCH_ERR("CopyModel: Could not find machine model name\n");
success = false;
goto exit;
}
*model = strndup(machineModel, modelLen);
if (*model == NULL)
{
RARCH_ERR("CopyModel: Could not find machine model name\n");
@ -88,6 +91,7 @@ static bool CopyModel(char** model, uint32_t *majorRev, uint32_t *minorRev)
*majorRev = 0;
*minorRev = 0;
revStr = strpbrk(machineModel, "0123456789");
if (!revStr)
{
RARCH_ERR("CopyModel: Could not find machine version number, inferred value is 0,0\n");
@ -96,6 +100,7 @@ static bool CopyModel(char** model, uint32_t *majorRev, uint32_t *minorRev)
}
count = sscanf(revStr, "%d,%d", majorRev, minorRev);
if (count < 2)
{
RARCH_ERR("CopyModel: Could not find machine version number\n");