Re: [hackers] [sbase] getlines: Style fix || sin

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Wed, 11 Feb 2015 10:40:33 +0000

On Wed, Feb 11, 2015 at 08:50:38AM +0100, k0ga_AT_shike2.com wrote:
> > }
> > linelen = len + 1;
> > - b->lines[b->nlines-1] = emalloc(linelen);
> > - memcpy(b->lines[b->nlines-1], line, linelen);
> > + b->lines[b->nlines - 1] = emalloc(linelen);
> > + memcpy(b->lines[b->nlines - 1], line, linelen);
> > }
>
> What do you think about this version?
>
> b->lines[b->nlines - 1] = memcpy(emalloc(linelen), line, linelen);

Nice :)
Received on Wed Feb 11 2015 - 11:40:33 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 11 2015 - 11:48:12 CET