From 3e212b5d2bc8746d8e1a9ed86d3122601d797036 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Wed, 6 Oct 2010 14:19:30 +0000 Subject: [PATCH] module.c (read_module): Remove useless string duplication. 2010-10-06 Mikael Morin * module.c (read_module): Remove useless string duplication. From-SVN: r165028 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/module.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8d8fc7fbf5c..b4252ec7f79 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2010-10-06 Mikael Morin + + * module.c (read_module): Remove useless string duplication. + 2010-10-06 Mikael Morin * gfortranspec.c (append_arg): Remove commented code. diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index c90fe0d298f..02f57566d6c 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -4372,8 +4372,8 @@ read_module (void) p = name; /* Exception: Always import vtabs & vtypes. */ - if (p == NULL && (strcmp (xstrndup (name,5), "vtab$") == 0 - || strcmp (xstrndup (name,6), "vtype$") == 0)) + if (p == NULL && (strncmp (name, "vtab$", 5) == 0 + || strncmp (name, "vtype$", 6) == 0)) p = name; /* Skip symtree nodes not in an ONLY clause, unless there