muscle: Initialize variables and check return codes
This commit is contained in:
parent
7360c4bf0c
commit
1594b1167d
|
@ -207,10 +207,13 @@ int mscfs_check_selection(mscfs_t *fs, int requiredItem)
|
||||||
|
|
||||||
int mscfs_loadFileInfo(mscfs_t* fs, const u8 *path, int pathlen, mscfs_file_t **file_data, int* idx)
|
int mscfs_loadFileInfo(mscfs_t* fs, const u8 *path, int pathlen, mscfs_file_t **file_data, int* idx)
|
||||||
{
|
{
|
||||||
msc_id fullPath;
|
msc_id fullPath = {{0, 0, 0, 0}};
|
||||||
int x;
|
int x, rc;
|
||||||
assert(fs != NULL && path != NULL && file_data != NULL);
|
assert(fs != NULL && path != NULL && file_data != NULL);
|
||||||
mscfs_lookup_path(fs, path, pathlen, &fullPath, 0);
|
rc = mscfs_lookup_path(fs, path, pathlen, &fullPath, 0);
|
||||||
|
if (rc != SC_SUCCESS) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Obtain file information while checking if it exists */
|
/* Obtain file information while checking if it exists */
|
||||||
mscfs_check_cache(fs);
|
mscfs_check_cache(fs);
|
||||||
|
|
Loading…
Reference in New Issue