On Thu, Apr 19, 2012 at 06:47:57PM -0600, Eric Blake wrote:
> On 04/19/2012 06:41 PM, Michael Roth wrote:
>
> >> + char *value;
> >> + int i;
> >> +
> >> + value = g_malloc(48 + 1);
> >> + for (i = 0; i < 48; i++) {
> >> + value[i] = env->cpuid_model[i >> 2] >> (8 * (i & 3));
> >
> > setter code is a bit difficult to parse but I think we need value[i] &= 0xff
> > here
>
> value[i] is a char. Unless you're planning on compiling for a non-POSIX
> system where char is more than 8 bits, value[i] &= 0xff is a no-op.
Heh, indeed it is. Please disregard :)
>
> --
> Eric Blake [email protected] +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>