Skip to content

Commit

Permalink
Code cleanup: remove accidental self-assigns in mbr.c that have no ef…
Browse files Browse the repository at this point in the history
…fect
  • Loading branch information
micahsnyder committed Mar 6, 2024
1 parent 24226f7 commit 3f7f247
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libclamav/mbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,19 @@ cl_error_t cli_scanmbr(cli_ctx *ctx, size_t sectorsize)
/* MBR checks */
status = mbr_check_mbr(&mbr, maplen, sectorsize);
if (status != CL_SUCCESS) {
status = status;
goto done;
}

/* MBR is valid, examine bootstrap code */
status = cli_magic_scan_nested_fmap_type(ctx->fmap, 0, sectorsize, ctx, CL_TYPE_ANY, NULL, LAYER_ATTRIBUTES_NONE);
if (status != CL_SUCCESS) {
status = status;
goto done;
}

/* check that the partition table has no intersections - HEURISTICS */
if (SCAN_HEURISTIC_PARTITION_INTXN && (ctx->dconf->other & OTHER_CONF_PRTNINTXN)) {
status = mbr_primary_partition_intersection(ctx, mbr, sectorsize);
if (status != CL_SUCCESS) {
status = status;
goto done;
}
}
Expand Down Expand Up @@ -225,7 +222,6 @@ cl_error_t cli_scanmbr(cli_ctx *ctx, size_t sectorsize)
status = mbr_scanextprtn(ctx, &prtncount, mbr.entries[i].firstLBA,
mbr.entries[i].numLBA, sectorsize);
if (status != CL_SUCCESS) {
status = status;
goto done;
}
} else {
Expand All @@ -236,7 +232,6 @@ cl_error_t cli_scanmbr(cli_ctx *ctx, size_t sectorsize)
mbr_parsemsg("cli_magic_scan_nested_fmap_type: [%u, +%u)\n", partoff, partsize);
status = cli_magic_scan_nested_fmap_type(ctx->fmap, partoff, partsize, ctx, CL_TYPE_PART_ANY, NULL, LAYER_ATTRIBUTES_NONE);
if (status != CL_SUCCESS) {
status = status;
goto done;
}
}
Expand Down

0 comments on commit 3f7f247

Please sign in to comment.