X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fcp-demint.c;h=1d1a77af748ba2485272db761fa4244e25b5e2e2;hb=722a5e98ea14fbc41acfb561ff4db6bfc43593bf;hp=8c200baed9a7e1273751b0d22f3d6f48c472a8a2;hpb=9334f9c6cd576128ec4fc891b5fcf267a7fca7fb;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/cp-demint.c b/libiberty/cp-demint.c index 8c200baed9..1d1a77af74 100644 --- a/libiberty/cp-demint.c +++ b/libiberty/cp-demint.c @@ -25,7 +25,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file implements a few interface functions which are provided @@ -130,18 +130,18 @@ cplus_demangle_fill_component (struct demangle_component *p, int cplus_demangle_fill_builtin_type (struct demangle_component *p, - const char *typename) + const char *type_name) { int len; unsigned int i; - if (p == NULL || typename == NULL) + if (p == NULL || type_name == NULL) return 0; - len = strlen (typename); + len = strlen (type_name); for (i = 0; i < D_BUILTIN_TYPE_COUNT; ++i) { if (len == cplus_demangle_builtin_types[i].len - && strcmp (typename, cplus_demangle_builtin_types[i].name) == 0) + && strcmp (type_name, cplus_demangle_builtin_types[i].name) == 0) { p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE; p->u.s_builtin.type = &cplus_demangle_builtin_types[i]; @@ -206,10 +206,8 @@ cplus_demangle_v3_components (const char *mangled, int options, void **mem) malloc (di.num_subs * sizeof (struct demangle_component *))); if (di.comps == NULL || di.subs == NULL) { - if (di.comps != NULL) - free (di.comps); - if (di.subs != NULL) - free (di.subs); + free (di.comps); + free (di.subs); return NULL; }