aboutsummaryrefslogtreecommitdiff
path: root/gcc/fix-header.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1993-07-27 13:55:12 -0700
committerPer Bothner <bothner@gcc.gnu.org>1993-07-27 13:55:12 -0700
commitec0ed4f7ff7960348bf40f367375736af081020a (patch)
treeadb511619b685e960b04d5b620b379d564a6a7cc /gcc/fix-header.c
parent7b03247ca374d76b46172d123540c19bca6c080d (diff)
downloadgcc-ec0ed4f7ff7960348bf40f367375736af081020a.zip
gcc-ec0ed4f7ff7960348bf40f367375736af081020a.tar.gz
gcc-ec0ed4f7ff7960348bf40f367375736af081020a.tar.bz2
patch-header.c (read_scan_file): Minor re-write to avoid obstack_copy0, since that uses the non-portable bcopy().
* patch-header.c (read_scan_file): Minor re-write to avoid obstack_copy0, since that uses the non-portable bcopy(). From-SVN: r5007
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r--gcc/fix-header.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index 4d3dfef..85f90c7 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -306,10 +306,10 @@ read_scan_file (scan_file)
partial_count++;
partial = (struct partial_proto*)
obstack_alloc (&scan_file_obstack, sizeof(struct partial_proto));
- partial->fname
- = obstack_copy0 (&scan_file_obstack, fname, strlen (fname));
- partial->rtype
- = obstack_copy0 (&scan_file_obstack, rtype, strlen (rtype));
+ partial->fname = obstack_alloc (&scan_file_obstack, strlen(fname) + 1);
+ strcpy (partial->fname, fname);
+ partial->rtype = obstack_alloc (&scan_file_obstack, strlen(rtype) + 1);
+ strcpy (partial->rtype, rtype);
partial->line_seen = atoi(line_seen);
partial->fn = fn;
fn->partial = partial;