Patchwork [fortran,4/22] Various minor fixups

login
register
mail settings
Submitter Mikael Morin
Date Oct. 5, 2010, 10:11 a.m.
Message ID <20101005100948.1836.44041@gimli.local>
Download mbox | patch
Permalink /patch/66806/
State New
Headers show

Comments

Mikael Morin - Oct. 5, 2010, 10:11 a.m.
2010-10-04  Mikael Morin  <mikael@gcc.gnu.org>

	* module.c (read_module): Remove useless string duplication.

Patch

diff --git a/module.c b/module.c
index c90fe0d..02f5756 100644
--- a/module.c
+++ b/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