lkml.org 
[lkml]   [2014]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist
On Wed, Sep 10, 2014 at 11:08:46AM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

> + if (entries == NULL)
> + return -ENOMEM;
> +
> + fda->nr_alloc = nr_alloc;
> + fda->entries = entries;
> + return 0;
> +}
> +
> +struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow)
> +{
> + struct fdarray *fda = calloc(1, sizeof(*fda));
> +
> + if (fda != NULL) {
> + if (fdarray__grow(fda, nr_alloc)) {
> + free(fda);
> + fda = NULL;
> + } else {
> + fda->nr_autogrow = nr_autogrow;
> + }
> + }
> +
> + return fda;
> +}

fdarray__new is never used..

jirka


\
 
 \ /
  Last update: 2014-09-22 15:01    [W:0.208 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site