firmware-utils/ptgen: remove unused variable assignment
authorDaniel Golle <daniel@makrotopia.org>
Sun, 14 Mar 2021 19:04:20 +0000 (19:04 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 14 Mar 2021 21:59:58 +0000 (21:59 +0000)
Discovered by coverty:

 CID 1473630:  Code maintainability issues  (UNUSED_VALUE)

 Assigning value from "type_to_guid_and_name(type, &name)" to
 "part_guid" here, but that stored value is overwritten before it can
 be used.

Remove the now redundant assignment of part_guid which is also set
conditionally later on.

Fixes: 4a078bd135 ("firmware-utils/ptgen: fix partition guid and name")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
tools/firmware-utils/src/ptgen.c

index 1eed21393d8b8f57a5352fe81e143e1d74623005..d911b9d1f01ee90084e5120a8d4e33d27245d1ba 100644 (file)
@@ -630,7 +630,6 @@ int main (int argc, char **argv)
                        break;
                case 't':
                        type = (char)strtoul(optarg, NULL, 16);
-                       part_guid = type_to_guid_and_name(type, &name);
                        break;
                case 'a':
                        active = (int)strtoul(optarg, NULL, 0);