Remove gdb/python/python.c code that handles strlen failing with -1
authorPedro Alves <palves@redhat.com>
Tue, 3 May 2016 11:16:55 +0000 (12:16 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 3 May 2016 11:16:55 +0000 (12:16 +0100)
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.

gdb/ChangeLog
gdb/python/python.c

index 05e5c405a35b44653d9d715cf3bbb84b8d4b2567..c5b732527a5d7b142fc70ee6c80aa79b45c529c2 100644 (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".
index b90e5e53dc2229afbefb6bcde22b2f2b2948f370..ea9cf85d9a0a8f197706645ba0f4fb683b1019a8 100644 (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)
     {
This page took 0.028574 seconds and 4 git commands to generate.