Skip to content

Commit

Permalink
partitions/ibm: Remove unnecessary memset
Browse files Browse the repository at this point in the history
The data holding the volume label information is zeroed in case no valid
volume label was found. Since the label information isn't used in that
case, zeroing the data doesn't provide any value whatsoever.

Remove the unnecessary memset() call accordingly.

Signed-off-by: Jan Höppner <[email protected]>
Reviewed-by: Stefan Haberland <[email protected]>
Signed-off-by: Stefan Haberland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
hoeppnerj authored and axboe committed Oct 4, 2023
1 parent 5e9b7cf commit d323c1a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions block/partitions/ibm.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ static int find_label(struct parsed_partitions *state,
break;
}
}
if (!found)
memset(label, 0, sizeof(*label));

return found;
}
Expand Down

0 comments on commit d323c1a

Please sign in to comment.