Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2014 19:00:15 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh <imp@freebsd.org>
Subject:   Re: svn commit: r273051 - head/sys/dev/isp
Message-ID:  <20141015020015.GC1852@funkthat.com>
In-Reply-To: <C7886544-04BE-42F7-AA70-0190F6BCF1E5@bsdimp.com>
References:  <201410131623.s9DGNwj3032294@svn.freebsd.org> <20141015015148.GB1852@funkthat.com> <C7886544-04BE-42F7-AA70-0190F6BCF1E5@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh wrote this message on Tue, Oct 14, 2014 at 19:58 -0600:
> On Oct 14, 2014, at 7:51 PM, John-Mark Gurney <jmg@funkthat.com> wrote:
> 
> > Warner Losh wrote this message on Mon, Oct 13, 2014 at 16:23 +0000:
> >> Author: imp
> >> Date: Mon Oct 13 16:23:58 2014
> >> New Revision: 273051
> >> URL: https://svnweb.freebsd.org/changeset/base/273051
> >> 
> >> Log:
> >>  Use the C99 flexible array construct to denote a variable amount of
> >>  data rather than the old-school [1] construct. We have required c99
> >>  compilers for some time.
> > 
> > Have you audited that there aren't any mallocs or anything else that
> > needs to be adjusted? i.e. old code that did:
> > var = malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1));
> > 
> > Will now allocate too few bytes...
> 
> I audited it. These structures are never malloced and only used to
> describe structures that are passed back and forth to the firmware.
> When used in host memory, there?s a fixed allocation size that?s
> independent of the structure size. And they are used in like 3 or 4
> places that I could find.
> 
> Did I miss something?

I looked briefly, but didn't see anything... I just wanted to make sure
since it wasn't mentioned in the commit message...

Thanks.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141015020015.GC1852>