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) {
|
||||
switch (opt) {
|
||||
case 'm':
|
||||
base_devtree = strdup(optarg);
|
||||
base_devtree = optarg;
|
||||
break;
|
||||
case 'o':
|
||||
override_devtree = strdup(optarg);
|
||||
override_devtree = optarg;
|
||||
break;
|
||||
case 'p':
|
||||
chipset_devtree = strdup(optarg);
|
||||
chipset_devtree = optarg;
|
||||
break;
|
||||
case 'c':
|
||||
outputc = strdup(optarg);
|
||||
outputc = optarg;
|
||||
break;
|
||||
case 'r':
|
||||
outputh = strdup(optarg);
|
||||
outputh = optarg;
|
||||
break;
|
||||
case 'd':
|
||||
outputd = strdup(optarg);
|
||||
outputd = optarg;
|
||||
break;
|
||||
case 'f':
|
||||
outputf = strdup(optarg);
|
||||
outputf = optarg;
|
||||
break;
|
||||
case 'h':
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user