From 759ef83693911e20efd389b20cbf8f3a8eec30eb Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 14 Aug 2009 00:32:33 +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/ui-file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/ui-file.h') diff --git a/gdb/ui-file.h b/gdb/ui-file.h index 1562d5a..bf9915c 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -73,8 +73,8 @@ extern void ui_file_put (struct ui_file *src, ui_file_put_method_ftype *write, v /* Returns a freshly allocated buffer containing the entire contents of FILE (as determined by ui_file_put()) with a NUL character - appended. LENGTH is set to the size of the buffer minus that - appended NUL. */ + appended. LENGTH, if not NULL, is set to the size of the buffer + minus that appended NUL. */ extern char *ui_file_xstrdup (struct ui_file *file, long *length); -- cgit v1.1