Re: [dev] [st] [PATCH 1/2] Fix commented out code

From: Alexander Krotov <ilabdsf_AT_gmail.com>
Date: Thu, 30 Mar 2017 08:53:49 +0300

On Wed, Mar 29, 2017 at 10:09:15AM +0200, Ivan Delalande wrote:
> On Sat, Mar 25, 2017 at 11:02:42PM +0300, Alexander Krotov wrote:
> > --- a/st.c
> > +++ b/st.c
> > _AT_@ -2537,7 +2537,7 @@ tresize(int col, int row)
> > }
> >
> > /* allocate any new rows */
> > - for (/* i == minrow */; i < row; i++) {
> > + for (/* i = minrow */; i < row; i++) {
> > term.line[i] = xmalloc(col * sizeof(Glyph));
> > term.alt[i] = xmalloc(col * sizeof(Glyph));
> > }
>
> I don't think that's a typo, just a short form for "hey, watch out,
> remember we still have `i == minrow` from the last loop here!". ;)

I read it as initialization of i that is safe to uncomment but is
unnecessary so it is commented to help non-optimizing compilers.
Received on Thu Mar 30 2017 - 07:53:49 CEST

This archive was generated by hypermail 2.3.0 : Thu Mar 30 2017 - 08:00:14 CEST