aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-driver-system.c
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-01-08 16:37:08 +0000
committerTeresa Johnson <tejohnson@gcc.gnu.org>2014-01-08 16:37:08 +0000
commit40d6b7535cdc6b2fbe02ba7dc3335a14bf343ea3 (patch)
treefffc9c28e27be439d23aa1e73163256e25cf97f7 /libgcc/libgcov-driver-system.c
parentab04b46efc42eda6fe74b5fb4551409d29538777 (diff)
downloadgcc-40d6b7535cdc6b2fbe02ba7dc3335a14bf343ea3.zip
gcc-40d6b7535cdc6b2fbe02ba7dc3335a14bf343ea3.tar.gz
gcc-40d6b7535cdc6b2fbe02ba7dc3335a14bf343ea3.tar.bz2
gcov-io.c (gcov_var): Move from gcov-io.h.
2014-01-08 Rong Xu <xur@google.com> * gcc/gcov-io.c (gcov_var): Move from gcov-io.h. (gcov_position): Ditto. (gcov_is_error): Ditto. (gcov_rewrite): Ditto. * gcc/gcov-io.h: Refactor. Move gcov_var to gcov-io.h, and libgcov only part to libgcc/libgcov.h. * libgcc/libgcov-driver.c: Use libgcov.h. (buffer_fn_data): Use xmalloc instead of malloc. (gcov_exit_merge_gcda): Ditto. * libgcc/libgcov-driver-system.c (allocate_filename_struct): Ditto. * libgcc/libgcov.h: New common header files for libgcov-*.h. * libgcc/libgcov-interface.c: Use libgcov.h * libgcc/libgcov-merge.c: Ditto. * libgcc/libgcov-profiler.c: Ditto. * libgcc/Makefile.in: Add dependence to libgcov.h From-SVN: r206435
Diffstat (limited to 'libgcc/libgcov-driver-system.c')
-rw-r--r--libgcc/libgcov-driver-system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c
index b023bfd..1bb7402 100644
--- a/libgcc/libgcov-driver-system.c
+++ b/libgcc/libgcov-driver-system.c
@@ -124,7 +124,7 @@ allocate_filename_struct (struct gcov_filename_aux *gf)
prefix_length = 1;
}
/* Allocate and initialize the filename scratch space plus one. */
- gi_filename = (char *) malloc (prefix_length + gcov_max_filename + 2);
+ gi_filename = (char *) xmalloc (prefix_length + gcov_max_filename + 2);
if (prefix_length)
memcpy (gi_filename, gcov_prefix, prefix_length);
gi_filename_up = gi_filename + prefix_length;