summaryrefslogtreecommitdiff
path: root/util/sconfig/main.c
diff options
context:
space:
mode:
authorJakub Czapiga <jacz@semihalf.com>2022-12-08 15:43:51 +0100
committerNico Huber <nico.h@gmx.de>2024-07-06 15:24:30 +0000
commit227639cdd9e61a42c1b7f84a79fc7e431cb5a858 (patch)
tree4a878afb902d2522ea47bf7b0c04ea4367d3ce38 /util/sconfig/main.c
parent9b31a90e7fda68ad1b03b65fc295fad9a6a3986f (diff)
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>
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r--util/sconfig/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 04f78a406e..3f12946edf 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -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: