Felix Singer has uploaded this change for review.

View Change

libflashrom.c: Remove superfluous type casts

Change-Id: I528245511f0620a771863d3f8f7a74add7299948
Signed-off-by: Felix Singer <felixsinger@posteo.net>
---
M libflashrom.c
1 file changed, 16 insertions(+), 12 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/91/70391/1
diff --git a/libflashrom.c b/libflashrom.c
index 44f297f..c6674e3 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -102,14 +102,10 @@
for (unsigned int i = 0; i < flashchips_size; ++i) {
supported_flashchips[i].vendor = flashchips[i].vendor;
supported_flashchips[i].name = flashchips[i].name;
- supported_flashchips[i].tested.erase =
- (enum flashrom_test_state)flashchips[i].tested.erase;
- supported_flashchips[i].tested.probe =
- (enum flashrom_test_state)flashchips[i].tested.probe;
- supported_flashchips[i].tested.read =
- (enum flashrom_test_state)flashchips[i].tested.read;
- supported_flashchips[i].tested.write =
- (enum flashrom_test_state)flashchips[i].tested.write;
+ supported_flashchips[i].tested.erase = flashchips[i].tested.erase;
+ supported_flashchips[i].tested.probe = flashchips[i].tested.probe;
+ supported_flashchips[i].tested.read = flashchips[i].tested.read;
+ supported_flashchips[i].tested.write = flashchips[i].tested.write;
supported_flashchips[i].total_size = flashchips[i].total_size;
}

@@ -139,8 +135,7 @@
for (int i = 0; i < boards_known_size; ++i) {
supported_boards[i].vendor = binfo[i].vendor;
supported_boards[i].name = binfo[i].name;
- supported_boards[i].working =
- (enum flashrom_test_state) binfo[i].working;
+ supported_boards[i].working = binfo[i].working;
}

return supported_boards;
@@ -174,8 +169,7 @@
supported_chipsets[i].chipset = chipset[i].device_name;
supported_chipsets[i].vendor_id = chipset[i].vendor_id;
supported_chipsets[i].chipset_id = chipset[i].device_id;
- supported_chipsets[i].status =
- (enum flashrom_test_state) chipset[i].status;
+ supported_chipsets[i].status = chipset[i].status;
}

return supported_chipsets;

To view, visit change 70391. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I528245511f0620a771863d3f8f7a74add7299948
Gerrit-Change-Number: 70391
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-MessageType: newchange