hos: homogenize return values

This commit is contained in:
CTCaer
2026-02-22 04:14:00 +02:00
parent 8e3771afbb
commit 520bc8cbfb
14 changed files with 253 additions and 244 deletions

View File

@@ -96,7 +96,7 @@ static int _pkg3_kip1_skip(char ***pkg3_kip1_skip, u32 *pkg3_kip1_skip_num, char
{
int len = strlen(value);
if (!len || (*pkg3_kip1_skip_num) >= PKG3_KIP_SKIP_MAX)
return 0;
return 1;
// Allocate pointer list memory.
if (!(*pkg3_kip1_skip))
@@ -116,11 +116,11 @@ static int _pkg3_kip1_skip(char ***pkg3_kip1_skip, u32 *pkg3_kip1_skip_num, char
(*pkg3_kip1_skip)[(*pkg3_kip1_skip_num)++] = c + 1;
if ((*pkg3_kip1_skip_num) >= PKG3_KIP_SKIP_MAX)
return 0;
return 1;
}
}
return 1;
return 0;
}
int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
@@ -153,15 +153,15 @@ int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
#ifdef HOS_MARIKO_STOCK_SECMON
if (stock && emummc_disabled && (pkg1_old || h_cfg.t210b01))
return 1;
return 0;
#else
if (stock && emummc_disabled && pkg1_old)
return 1;
return 0;
#endif
// Try to open PKG3.
if (f_open(&fp, path, FA_READ) != FR_OK)
return 0;
return 1;
void *pkg3 = malloc(f_size(&fp));
@@ -268,7 +268,7 @@ int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
free(pkg3_kip1_skip);
return 1;
return 0;
}
// Failed. Close and free all.
@@ -277,5 +277,5 @@ int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
free(pkg3_kip1_skip);
free(pkg3);
return 0;
return 1;
}