aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-09-22 20:00:53 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-09-22 20:00:53 +0000
commitd31d2fc374b0523049655a0038cbdf1b43827edf (patch)
tree79ce4936223decea6d217e46548131755d639b3d /gdb/python/py-objfile.c
parent7f6130ff859e3676d0d27a3db5a42c0233dd93ec (diff)
downloadgdb-d31d2fc374b0523049655a0038cbdf1b43827edf.zip
gdb-d31d2fc374b0523049655a0038cbdf1b43827edf.tar.gz
gdb-d31d2fc374b0523049655a0038cbdf1b43827edf.tar.bz2
gdb/
Code cleanup. * objfiles.c (allocate_objfile) <objfile->name != NULL>: Remove. (free_objfile) <objfile->name != NULL>: Remove the conditional around xfree. * objfiles.h (struct objfile) <name>: New comment it is never NULL. * python/py-auto-load.c (auto_load_new_objfile) <!objfile->name>: Remove. * python/py-objfile.c (objfpy_get_filename) <obj->objfile->name> Remove the conditional. * python/py-progspace.c (pspy_get_filename) <objfile->name>: Likewise.
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r--gdb/python/py-objfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 1aa6a4d..1473503 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -46,7 +46,7 @@ objfpy_get_filename (PyObject *self, void *closure)
{
objfile_object *obj = (objfile_object *) self;
- if (obj->objfile && obj->objfile->name)
+ if (obj->objfile)
return PyString_Decode (obj->objfile->name, strlen (obj->objfile->name),
host_charset (), NULL);
Py_RETURN_NONE;