From e4821e2f5fd281eb6b88b642fa9beaf9c3a35070 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 May 2021 23:04:01 -0400 Subject: sim: options: fix --help output The hash table rewrite broke --help output due to subtle behavior: calling dup_arg_p(NULL) will create & clear the table, not just create it. The --help output relies on this to clear the table before it shows things. --- sim/common/ChangeLog | 4 ++++ sim/common/sim-options.c | 1 + 2 files changed, 5 insertions(+) (limited to 'sim') diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 55d684b..7abaeb3 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,9 @@ 2021-05-01 Mike Frysinger + * sim-options.c (dup_arg_p): Call htab_empty. + +2021-05-01 Mike Frysinger + * dv-sockser.c (dv_sockser_install): Rename to ... (sim_install_dv_sockser): ... this. * dv-sockser.h (dv_sockser_install): Delete. diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index a6da8ec..1522cac 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -437,6 +437,7 @@ dup_arg_p (const char *arg) arg_table = htab_create_alloc (10, htab_hash_string, compare_strings, NULL, xcalloc, free); + htab_empty (arg_table); return 0; } -- cgit v1.1