aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-05-03 12:16:55 +0100
committerPedro Alves <palves@redhat.com>2016-05-03 12:16:55 +0100
commit1aa96702887a9c0f66b5d7cab034bf6718796708 (patch)
treef793e49a83690cd3406a1d0bd1c22d6bf67c02ab /gdb/python
parent1f56df9d0d5ad89806c24e71f296576d82344613 (diff)
downloadgdb-1aa96702887a9c0f66b5d7cab034bf6718796708.zip
gdb-1aa96702887a9c0f66b5d7cab034bf6718796708.tar.gz
gdb-1aa96702887a9c0f66b5d7cab034bf6718796708.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.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index b90e5e5..ea9cf85 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1711,11 +1711,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)
{