On Sun, Dec 29, 2019 at 04:33:59PM +0100, Ingo Schwarze wrote:
> Regarding the bugfix in the code, thanks to Larry McVoy for
> providing feedback directly to me. In particular, he suggested
> that while my fix wasn't incorrect, the two lines immediately
> following it can be simplified, making the code easier to read.
>
> There may be opportunity for major cleanup in this code, too,
> but i don't think that should be mixed into a bugfix.
> The simplification of these two lines, however, is so closely
> related to the bugfix that it seems reasonable to include it.
>
> Any OKs for the patch in the following form?
LGTM as far as it goes. If I were doing it I think I'd take the
opportunity to simplify it a little further into this sort of structure:
if (*form == '%') {
form++;
result += '%';
}
else {
...
snprintf(sprintf_buf, sizeof(sprintf_buf),
one_format.contents(), v[i++]);
result += sprintf_buf;
}
one_format.clear();
But I understand if you'd prefer not to do that here.
--
Colin Watson [[email protected]]