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. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature