summaryrefslogtreecommitdiff
path: root/fixincludes/server.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-15 18:28:36 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-15 18:28:36 +0000
commit8d0afcccdc8ad93ff596ef95b44d520d6b3c73ae (patch)
treecd18ca760bb357ceaa6cda012988fe320aa1b783 /fixincludes/server.c
parent20f1123c923e66905a1d30cea7f621f1561bdcb2 (diff)
downloadgcc-8d0afcccdc8ad93ff596ef95b44d520d6b3c73ae.tar.gz
* fixlib.c (load_file_data): Use XRESIZVEC in lieu of xrealloc.
* server.c (load_data): Likewise. (run_shell): Use XCNEW (char) in lieu of xcalloc (1, 1). * fixincl.c: #include <sys/wait.h> (run_compiles): Use XCNEWVEC instead of xcalloc. (fix_with_system, start_fixer): Use XNEWVEC instead of xmalloc. * fixfixes.c (FIX_PROC_HEAD, main): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99740 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/server.c')
-rw-r--r--fixincludes/server.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fixincludes/server.c b/fixincludes/server.c
index 902fda15072..73db78b2e79 100644
--- a/fixincludes/server.c
+++ b/fixincludes/server.c
@@ -83,7 +83,7 @@ load_data (FILE* fp)
t_bool got_done = BOOL_FALSE;
text_size = sizeof (z_line) * 2;
- pz_scan = pz_text = xmalloc (text_size);
+ pz_scan = pz_text = XNEWVEC (char, text_size);
for (;;)
{
@@ -109,7 +109,7 @@ load_data (FILE* fp)
size_t off = (size_t) (pz_scan - pz_text);
text_size += 4096;
- pz_text = xrealloc (pz_text, text_size);
+ pz_text = XRESIZEVEC (char, pz_text, text_size);
pz_scan = pz_text + off;
}
}
@@ -124,7 +124,7 @@ load_data (FILE* fp)
while ((pz_scan > pz_text) && ISSPACE (pz_scan[-1]))
pz_scan--;
*pz_scan = NUL;
- return xrealloc (pz_text, strlen (pz_text) + 1);
+ return XRESIZEVEC (char, pz_text, strlen (pz_text) + 1);
}
@@ -260,7 +260,7 @@ run_shell (const char* pz_cmd)
if (server_id <= 0)
{
fprintf (stderr, zNoServer, pz_cmd);
- return xcalloc (1, 1);
+ return XCNEW (char);
}
/* Make sure the process will pay attention to us, send the
@@ -275,7 +275,7 @@ run_shell (const char* pz_cmd)
if (server_id == NULLPROCESS)
{
fprintf (stderr, zNoServer, pz_cmd);
- return xcalloc (1, 1);
+ return XCNEW (char);
}
/* Now try to read back all the data. If we fail due to either a
@@ -295,7 +295,7 @@ run_shell (const char* pz_cmd)
fprintf (stderr, "CLOSING SHELL SERVER - command failure:\n\t%s\n",
pz_cmd);
- pz = xcalloc (1, 1);
+ pz = XCNEW (char);
}
#ifdef DEBUG
fprintf( stderr, "run_shell command success: %s\n", pz );