util/sconfig: Remove unnecessary strdup() calls
getopt() optarg value can be used without duplicaing if it is not modified, as it is the case here. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: Ie5a27f64077af1c04b06732cd601145b8becacfd Reviewed-on: https://review.coreboot.org/c/coreboot/+/70525 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
9b31a90e7f
commit
227639cdd9
@ -1971,25 +1971,25 @@ int main(int argc, char **argv)
|
|||||||
&option_index)) != EOF) {
|
&option_index)) != EOF) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'm':
|
case 'm':
|
||||||
base_devtree = strdup(optarg);
|
base_devtree = optarg;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
override_devtree = strdup(optarg);
|
override_devtree = optarg;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
chipset_devtree = strdup(optarg);
|
chipset_devtree = optarg;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
outputc = strdup(optarg);
|
outputc = optarg;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
outputh = strdup(optarg);
|
outputh = optarg;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
outputd = strdup(optarg);
|
outputd = optarg;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
outputf = strdup(optarg);
|
outputf = optarg;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user