From: Pedro Alves Date: Tue, 3 May 2016 11:16:55 +0000 (+0100) Subject: Remove gdb/python/python.c code that handles strlen failing with -1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1aa96702887a9c0f66b5d7cab034bf6718796708;p=binutils-gdb.git 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 * python/python.c (_initialize_python) [IS_PY3K]: Remove dead code. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 05e5c405a35..c5b732527a5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-05-03 Pedro Alves + + * python/python.c (_initialize_python) [IS_PY3K]: Remove dead + code. + 2016-05-03 Pedro Alves * configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic". diff --git a/gdb/python/python.c b/gdb/python/python.c index b90e5e53dc2..ea9cf85d9a0 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) {