diff options
author | Paul Smith <psmith@gnu.org> | 2006-02-20 02:14:00 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2006-02-20 02:14:00 +0000 |
commit | 6e0527913c6724fa92e2135de991e27df54c4289 (patch) | |
tree | c9e4c448ae4476e5ef81ca5a5ca8feb344e519c7 /commands.c | |
parent | bde826b18aeb6fd3c9de7a7733d1e163efde90e1 (diff) | |
download | gunmake-6e0527913c6724fa92e2135de991e27df54c4289.tar.gz |
- Memory cleanups, found with valgrind.
- Fix handling of special targets like .SUFFIX for VMS insensitive targets.
- Don't make temporary batch files for -n. Make sure batch files are created
in text mode.
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -157,7 +157,7 @@ set_file_variables (struct file *file) plus_len++; if (plus_len > plus_max) - plus_value = (char *) xmalloc (plus_max = plus_len); + plus_value = xrealloc (plus_value, plus_max = plus_len); cp = plus_value; qmark_len = plus_len + 1; /* Will be this or less. */ @@ -206,11 +206,11 @@ set_file_variables (struct file *file) cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */ if (qmark_len > qmark_max) - qmark_value = (char *) xmalloc (qmark_max = qmark_len); + qmark_value = xrealloc (qmark_value, qmark_max = qmark_len); qp = qmark_value; if (bar_len > bar_max) - bar_value = (char *) xmalloc (bar_max = bar_len); + bar_value = xrealloc (bar_value, bar_max = bar_len); bp = bar_value; for (d = file->deps; d != 0; d = d->next) |