lkml.org 
[lkml]   [2012]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 28/30] perf evsel: Provide a new constructor for tracepoints
Em Tue, Sep 25, 2012 at 01:26:46PM +0900, Namhyung Kim escreveu:
> On Mon, 24 Sep 2012 12:59:42 -0300, Arnaldo Carvalho de Melo wrote:
> > + if (size == alloc_size) {
> > + alloc_size += BUFSIZ;
> > + nbf = realloc(bf, alloc_size);
> > + if (nbf == NULL)
> > + goto out_free_bf;
> > + bf = nbf;
> > + }
> > +
> > + n = read(fd, bf + size, BUFSIZ);
>
> Wouldn't it be better doing s/BUFSIZ/alloc_size - size/ ? Although
> there'll be no partial reading issue when working on debugfs I guess.

Yeah, don't know if that is worth it :-\

- Arnaldo


\
 
 \ /
  Last update: 2012-09-25 14:21    [W:0.064 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site