mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Update return types in DDT functions to improve error handling
This commit is contained in:
@@ -1039,7 +1039,7 @@ bool set_ddt_entry_v2(aaruformatContext *ctx, uint64_t sector_address, uint64_t
|
|||||||
if(ctx == NULL || ctx->imageStream == NULL)
|
if(ctx == NULL || ctx->imageStream == NULL)
|
||||||
{
|
{
|
||||||
FATAL("Invalid context or image stream.");
|
FATAL("Invalid context or image stream.");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ctx->userDataDdtHeader.tableShift > 0)
|
if(ctx->userDataDdtHeader.tableShift > 0)
|
||||||
@@ -1233,7 +1233,7 @@ bool set_ddt_multi_level_v2(aaruformatContext *ctx, uint64_t sector_address, boo
|
|||||||
{
|
{
|
||||||
FATAL("DDT overflow: media does not fit in big DDT");
|
FATAL("DDT overflow: media does not fit in big DDT");
|
||||||
TRACE("Exiting set_ddt_multi_level_v2() = false");
|
TRACE("Exiting set_ddt_multi_level_v2() = false");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ddt_entry |= (uint64_t)sector_status << 28;
|
ddt_entry |= (uint64_t)sector_status << 28;
|
||||||
|
|||||||
Reference in New Issue
Block a user