groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pic anomalies


From: Colin Watson
Subject: Re: pic anomalies
Date: Sun, 29 Dec 2019 23:17:26 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

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                                       [address@hidden]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]