summaryrefslogtreecommitdiffstats
path: root/gcc/cppalloc.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-11 05:38:06 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-11 05:38:06 +0000
commitabb8772b865d3ea44a5e70b15591e17f379b7107 (patch)
tree52c46696ab752bb46fd99b5d07c89df8ea0e819d /gcc/cppalloc.c
parent5e25b6c0051d1080d65f763ab41fdd3ccf4c0266 (diff)
downloadppe42-gcc-abb8772b865d3ea44a5e70b15591e17f379b7107.tar.gz
ppe42-gcc-abb8772b865d3ea44a5e70b15591e17f379b7107.zip
1999-09-10 22:37 -0700 Zack Weinberg <zack@bitmover.com>
* cppalloc.c (xstrdup): Use memcpy. * cpperror.c (cpp_print_containing_files): Don't use cpp_notice. * cpplib.c (conditional_skip): Set temp->lineno. (do_endif): Make error message less obscure. (if_directive_name): New function. (cpp_get_token [case EOF]): Unwind the if stack and generate error messages for each unterminated conditional in this file. (parse_string): Do not behave differently if -traditional. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppalloc.c')
-rw-r--r--gcc/cppalloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c
index b42e523d8a5..47712e7a1ae 100644
--- a/gcc/cppalloc.c
+++ b/gcc/cppalloc.c
@@ -74,8 +74,8 @@ char *
xstrdup (input)
const char *input;
{
- unsigned size = strlen (input);
- char *output = xmalloc (size + 1);
- strcpy (output, input);
+ size_t size = strlen (input) + 1;
+ char *output = xmalloc (size);
+ memcpy (output, input, size);
return output;
}
OpenPOWER on IntegriCloud