diff options
author | Pedro Alves <palves@redhat.com> | 2016-05-03 12:16:55 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-05-03 12:18:50 +0100 |
commit | aaa3178dfb979f8ec476a326aca273125a1e3ee9 (patch) | |
tree | 28e2ad3ee95166cf08bc36fb41a1b976fb9b0c58 | |
parent | 386c90348551eb089124d64c9bc6ab17cbefb016 (diff) | |
download | binutils-aaa3178dfb979f8ec476a326aca273125a1e3ee9.zip binutils-aaa3178dfb979f8ec476a326aca273125a1e3ee9.tar.gz binutils-aaa3178dfb979f8ec476a326aca273125a1e3ee9.tar.bz2 |
Remove gdb/python/python.c code that handles strlen failing with -1
This makes no sense -- strlen doesn't really ever fail with -1.
gdb/ChangeLog:
2016-05-03 Pedro Alves <palves@redhat.com>
* python/python.c (_initialize_python) [IS_PY3K]: Remove dead
code.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/python.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 901da6f..c83459b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-05-03 Pedro Alves <palves@redhat.com> + + * python/python.c (_initialize_python) [IS_PY3K]: Remove dead + code. + 2016-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * symfile.c (find_pc_overlay): Add braces to avoid -Wparentheses diff --git a/gdb/python/python.c b/gdb/python/python.c index 7202105..9b80251 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1720,11 +1720,6 @@ message == an error message without a stack will be printed."), oldloc = setlocale (LC_ALL, NULL); setlocale (LC_ALL, ""); progsize = strlen (progname); - if (progsize == (size_t) -1) - { - fprintf (stderr, "Could not convert python path to string\n"); - return; - } progname_copy = (wchar_t *) PyMem_Malloc ((progsize + 1) * sizeof (wchar_t)); if (!progname_copy) { |