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.
This commit is contained in:
Pedro Alves 2016-05-03 12:16:55 +01:00
parent 1f56df9d0d
commit 1aa9670288
2 changed files with 5 additions and 5 deletions

View File

@ -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 Pedro Alves <palves@redhat.com>
* configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic".

View File

@ -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)
{