Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2014 19:58:35 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        John-Mark Gurney <jmg@funkthat.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:  <C7886544-04BE-42F7-AA70-0190F6BCF1E5@bsdimp.com>
In-Reply-To: <20141015015148.GB1852@funkthat.com>
References:  <201410131623.s9DGNwj3032294@svn.freebsd.org> <20141015015148.GB1852@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252


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
>>=20
>> 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.
>=20
> Have you audited that there aren't any mallocs or anything else that
> needs to be adjusted? i.e. old code that did:
> var =3D malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1));
>=20
> 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=92s a fixed allocation size that=92s
independent of the structure size. And they are used in like 3 or 4
places that I could find.

Did I miss something?

Warner


--Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJUPdTLAAoJEGwc0Sh9sBEAlVsP/2hsYMhJ0F5uylCQYnQKLi0J
42MxyPMKEgWcD5779LIdekjSz7mzLXmJoxul87uwJ9wXYIKQO5gOFItv1eiJCOZn
Jj6PHz6S+32IZ29K+LYgii4ujKQuhaVlmiFw1IBShtlTsBMrvbBBvXZR81EAUAFX
vJlsKINe6zpVZ+ksLbjEocv2TANlIQqHWgCO+/9azrHd+cHwA1nHYU/3KUnFBrtF
Hc2YV/irB2/QlVdSBfv5q/+GrgzL37TFnjIriug4uHpk47rGGaoHXgAbYrxHDRR4
2pLONS3mV4RvByBsOeBTSohLeV0aEFTPOBl7m+1mFFF9h0tWjw8Bdm9tUxvC46o3
79AkTeq3ztoRMVCRG2yxODQcOeHBRYDUGYmCa+G+lCsCpyKt8lNoyH2YOZJ2r0Ks
RqSkxkIBZg5kZkrk1fXAfsumh5zpTfOZJT9wD4q4SE6IMVaiQB1LgLWpudS4pRyf
W30OQlbdJ0A2ALMn22hVpaSXPt+14fJJBm4Vl0yLo6cw6Nek6VLFfOcFvN0wq3u5
094resIKK3WXEEhuNDg4lhSh+7W7a2whC6/vwTpzGKW09QY+2LF8/AYo7sOQKCGV
BcOrEZpM5dwsqQxxAPl+91mDm7KUnSEmdpuSN0IJ24WEJ8NC9ZQNgZUXZN5E03dL
5MqECHAC0Ny1SG3BdWf4
=yy+p
-----END PGP SIGNATURE-----

--Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C7886544-04BE-42F7-AA70-0190F6BCF1E5>