Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/70525?usp=email )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: util/sconfig: Remove unnecessary strdup() calls ......................................................................
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 --- M util/sconfig/main.c 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 04f78a4..3f12946 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -1971,25 +1971,25 @@ &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: