(add_symbol, unexpand_if_needed, abspath):
authorRichard Stallman <rms@gnu.org>
Fri, 21 May 1993 19:18:27 +0000 (19:18 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 21 May 1993 19:18:27 +0000 (19:18 +0000)
Supply missing arg to savestring.

From-SVN: r4528

gcc/protoize.c

index 910a6087c149af35c032c1b53f2200d6c0a1c7c4..729968a5e5063bdf00544d7e2f64b2a9c7fafbcd 100644 (file)
@@ -1021,7 +1021,7 @@ add_symbol (p, s)
      const char *s;
 {
   p->hash_next = NULL;
-  p->symbol = savestring (s);
+  p->symbol = savestring (s, strlen (s));
   p->ddip = NULL;
   p->fip = NULL;
   return p;
@@ -1160,9 +1160,9 @@ continue_outer: ;
       copy_p = line_buf + offset;
     }
   *copy_p++ = '\n';
-  *copy_p++ = '\0';
+  *copy_p = '\0';
 
-  return (got_unexpanded ? savestring (line_buf) : 0);
+  return (got_unexpanded ? savestring (line_buf, copy_p - line_buf) : 0);
 }
 \f
 /* Return the absolutized filename for the given relative
@@ -1265,7 +1265,7 @@ abspath (cwd, rel_filename)
   /* Make a copy (in the heap) of the stuff left in the absolutization
      buffer and return a pointer to the copy.  */
 
-  return savestring (abs_buffer);
+  return savestring (abs_buffer, outp - abs_buffer);
 }
 \f
 /* Given a filename (and possibly a directory name from which the filename