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

Re: [libvirt] [PATCH] qemu: Fix JSON migrate_set_downtime command



On 08/20/2010 03:21 AM, Daniel P. Berrange wrote:
>> Never mind.  I was thinking too much of printf's %d.  But with
>> qemuMonitorJSONMakeCommand, d: is a double, and your division by 1000.0
>> does indeed create a value that passes just fine through varargs.
> 
> I've never understood why printf() choose %d for integers instead
> of doubles :-)

%d - decimal
%x - hex
%o - octal

and I can also see

%f - floating point
%e - exponent

but:

%g - ?

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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