diff options
author | Roland McGrath <roland@redhat.com> | 1992-10-09 18:00:37 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1992-10-09 18:00:37 +0000 |
commit | b13de88757f7437029167cf4439718349b2c988f (patch) | |
tree | c8b6fc0329b09398372df3687b336c863c3a6289 /read.c | |
parent | b3747a6bdb92c042713f0ae03ccf429e1144c8cf (diff) | |
download | gunmake-b13de88757f7437029167cf4439718349b2c988f.tar.gz |
Formerly read.c.~38~
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -715,6 +715,7 @@ do_define (name, namelen, origin, lineno, infile, filename) definition[idx - 1] = '\0'; (void) define_variable (name, namelen, definition, origin, 1); free (definition); + freebuffer (&lb); return lineno; } else @@ -737,6 +738,8 @@ do_define (name, namelen, origin, lineno, infile, filename) /* No `endef'!! */ makefile_fatal (filename, lineno, "missing `endef', unterminated `define'"); + + /* NOTREACHED */ return 0; } @@ -1142,7 +1145,17 @@ record_files (filenames, pattern, pattern_percent, deps, commands_started, /* Defining .SUFFIXES with no dependencies clears out the list of suffixes. */ if (f == suffix_file && this == 0) - f->deps = 0; + { + d = f->deps; + while (d != 0) + { + struct dep *nextd = d->next; + free (d->name); + free (d); + d = nextd; + } + f->deps = 0; + } else if (f->deps != 0) { d = f->deps; @@ -1190,7 +1203,7 @@ record_files (filenames, pattern, pattern_percent, deps, commands_started, /* Free name if not needed further. */ if (f != 0 && name != f->name - && !(f->name == name + 2 && name[0] == '.' && name[1] == '/')) + && (name < f->name || name > f->name + strlen (f->name))) { free (name); name = f->name; @@ -1636,6 +1649,8 @@ multi_glob (chain, size) new = elt; } globfree (&gl); + free (old->name); + free (old); break; } @@ -1646,6 +1661,7 @@ multi_glob (chain, size) default: old->next = new; new = old; + break; } } |