From 013c637ee0cd488e79d73206a0347df969d2f33a Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 14 Aug 2009 00:32:31 +0000 Subject: * ui-file.h (ui_file_xstrdup): Mention that the length argument may be NULL. * ui-file.c (ui_file_xstrdup): Don't dereference LENGTH if it is NULL. * aix-thread.c (aix_thread_extra_thread_info): Pass NULL as length parameter to ui_file_xstrdup. * arm-tdep.c (_initialize_arm_tdep): Ditto. * infrun.c (print_target_wait_results): Ditto. * language.c (add_language): Ditto. * linespec.c (cplusplus_error): Ditto. * remote.c (escape_buffer): Ditto. * typeprint.c (type_to_string): Ditto. * utils.c (error_stream): Ditto. * varobj.c (value_get_print_value): Ditto. * xtensa-tdep.c (xtensa_verify_config): Replace `dummy' local with `length' local. Pass it to ui_file_xstrdup, and avoid an strlen call. * gdbarch.sh (verify_gdbarch): Ditto. * gdbarch.c: Regenerate. * cli/cli-setshow.c (do_setshow_command): Pass NULL as length parameter to ui_file_xstrdup. * python/python-frame.c (frapy_str): Ditto. * python/python-type.c (typy_str): Use the length local instead of calling strlen. * python/python-value.c (valpy_str): Pass NULL as length parameter to ui_file_xstrdup. --- gdb/typeprint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/typeprint.c') diff --git a/gdb/typeprint.c b/gdb/typeprint.c index 8133ad03be6..f090231f368 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -86,7 +86,6 @@ char * type_to_string (struct type *type) { char *s = NULL; - long dummy; struct ui_file *stb; struct cleanup *old_chain; volatile struct gdb_exception except; @@ -97,7 +96,7 @@ type_to_string (struct type *type) TRY_CATCH (except, RETURN_MASK_ALL) { type_print (type, "", stb, -1); - s = ui_file_xstrdup (stb, &dummy); + s = ui_file_xstrdup (stb, NULL); } if (except.reason < 0) s = NULL; -- cgit v1.2.1