diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-23 00:36:28 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-23 00:36:28 +0000 |
commit | 284a7b54530ebcd2e1027fe7dd831049e8a8b6f0 (patch) | |
tree | 790252fc6f2f85414e4da728fab71c76dd6c9020 /gcc/java/jvspec.c | |
parent | 93f8f9d6220fcd8077afe882eb7d98e5e540fcb2 (diff) | |
download | ppe42-gcc-284a7b54530ebcd2e1027fe7dd831049e8a8b6f0.tar.gz ppe42-gcc-284a7b54530ebcd2e1027fe7dd831049e8a8b6f0.zip |
* collect2.c (main): Use concat in lieu of xmalloc/sprintf.
(write_c_file_stat): Likewise.
* dbxout.c (dbxout_init): Likewise.
* profile.c (output_func_start_profiler): Likewise.
cp:
* xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
f:
* com.c (ffecom_subscript_check_): Use concat in lieu of
xmalloc/sprintf.
java:
* jvspec.c (lang_specific_driver): Fix memory allocation
deficit, by using concat in lieu of xmalloc/sprintf.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41495 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jvspec.c')
-rw-r--r-- | gcc/java/jvspec.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c index 105f8133c56..fd6ec5aab92 100644 --- a/gcc/java/jvspec.c +++ b/gcc/java/jvspec.c @@ -436,20 +436,14 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) if (strcmp (argv[i], "-classpath") == 0 || strcmp (argv[i], "-CLASSPATH") == 0) { - char* patharg - = (char*) xmalloc (strlen (argv[i]) + strlen (argv[i+1]) + 3); - sprintf (patharg, "-f%s=%s", argv[i]+1, argv[i+1]); - arglist[j] = patharg; + arglist[j] = concat ("-f", argv[i]+1, "=", argv[i+1], NULL); i++; continue; } if (strcmp (argv[i], "-d") == 0) { - char *patharg = (char *) xmalloc (sizeof ("-foutput-class-dir=") - + strlen (argv[i + 1]) + 1); - sprintf (patharg, "-foutput-class-dir=%s", argv[i + 1]); - arglist[j] = patharg; + arglist[j] = concat ("-foutput-class-dir=", argv[i + 1], NULL); ++i; continue; } |