diff options
author | Pedro Alves <palves@redhat.com> | 2009-08-14 00:32:33 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-08-14 00:32:33 +0000 |
commit | 759ef83693911e20efd389b20cbf8f3a8eec30eb (patch) | |
tree | 7e7de1542d7ae1e9bef5d8ca15956af47858f0d2 /gdb/linespec.c | |
parent | 4da0d875114aa6b8c919e2e36dc17ef3cab1dc69 (diff) | |
download | gdb-759ef83693911e20efd389b20cbf8f3a8eec30eb.zip gdb-759ef83693911e20efd389b20cbf8f3a8eec30eb.tar.gz gdb-759ef83693911e20efd389b20cbf8f3a8eec30eb.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index debe86f..3e943a1 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -150,7 +150,6 @@ static NORETURN void cplusplus_error (const char *name, const char *fmt, ...) { struct ui_file *tmp_stream; - long len; char *message; tmp_stream = mem_fileopen (); make_cleanup_ui_file_delete (tmp_stream); @@ -169,9 +168,9 @@ cplusplus_error (const char *name, const char *fmt, ...) "(Note leading single quote.)"), name, name); - message = ui_file_xstrdup (tmp_stream, &len); - make_cleanup (xfree, message); - throw_error (NOT_FOUND_ERROR, "%s", message); + message = ui_file_xstrdup (tmp_stream, NULL); + make_cleanup (xfree, message); + throw_error (NOT_FOUND_ERROR, "%s", message); } /* Return the number of methods described for TYPE, including the |