Date: Tue, 19 Jun 2012 11:24:27 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Gennady Proskurin <gprspb@mail.ru> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp <phk@freebsd.org> Subject: Re: svn commit: r237223 - head/sys/dev/fb Message-ID: <68FBE843-7337-4C90-B01F-E0CAABB62BCD@gsoft.com.au> In-Reply-To: <20120618093435.GA1017@gpr.nnz-home.ru> References: <201206180754.q5I7sBoQ063448@svn.freebsd.org> <20120618093435.GA1017@gpr.nnz-home.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18/06/2012, at 19:04, Gennady Proskurin wrote:
>> Modified: head/sys/dev/fb/fbreg.h
>> ==============================================================================
>> --- head/sys/dev/fb/fbreg.h Mon Jun 18 07:43:23 2012 (r237222)
>> +++ head/sys/dev/fb/fbreg.h Mon Jun 18 07:54:10 2012 (r237223)
>> @@ -39,6 +39,7 @@
>> static __inline void
>> copyw(uint16_t *src, uint16_t *dst, size_t size)
>> {
>> + size >>= 1;
>> while (size--)
>> *dst++ = *src++;
>> }
>
> If size is odd, this does not copy the last byte. Not sure, whether this is intended.
Add
KASSERT(size & 0x1 == 0, ("odd size copy"));
before
size >>= 1;
:)
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68FBE843-7337-4C90-B01F-E0CAABB62BCD>
