Re: Minor Comments on Gmake Internals
Paul Smith <[email protected]> Sat, 18 Dec 2021 09:15:54 -0500
| Newsgroups | gmane.comp.gnu.make.devel |
|---|---|
| Organization | GNU's Not UNIX! |
| Message-ID | <[email protected]> |
On Fri, 2021-12-17 at 20:22 -0800, Jon Forrest wrote: > 4) In tracing the startup execution of gmake, I see lots of calls to > expand.c/variable_buffer_output() with a length of 0. Is this as > expected? Such calls don't accomplish anything. Well, if we're calling this function with a length of strlen() and the string we're appending can be empty (which is obviously quite possible because all sorts of variables, expansions, etc. can be empty) then we'll call this function with a length of 0. There's no way to avoid this other than adding a check for a length of 0 to every caller of the function, which obviously we don't want to do.