diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-05-21 19:18:27 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-05-21 19:18:27 +0000 |
commit | 2a441539ed39b730d0ccd7b303699d31c886f678 (patch) | |
tree | f920d5da2beddda166f6638d2f0acde7341dd005 /gcc/protoize.c | |
parent | 627defc468ce24aed3c4eb0b3e857438d89d4490 (diff) | |
download | gcc-2a441539ed39b730d0ccd7b303699d31c886f678.tar.gz |
(add_symbol, unexpand_if_needed, abspath):
Supply missing arg to savestring.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r-- | gcc/protoize.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c index 910a6087c14..729968a5e50 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -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); } /* 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); } /* Given a filename (and possibly a directory name from which the filename |