qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} us


From: Andreas Schwab
Subject: Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter
Date: Fri, 04 Jan 2008 19:29:24 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

Andreas Färber <address@hidden> writes:

> Am 04.01.2008 um 14:20 schrieb Thiemo Seufer:
>
>> Carlo Marcelo Arenas Belon wrote:
>>> Trivial fix that ensures that all buffers used for bdrv_read or
>>> bdrv_write
>>> are from an array of the uint8_t type
>>
>> Do we have a host where this actually makes a difference?
>
> I believe Perl makes sizeof(char) checks, so there likely is some platform
> where sizeof(char) > 1.

Not in C.  sizeof(char) == 1 by definition.  Also CHAR_BIT >= 8, so
uint8_t can never be wider than char.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]