[Libvirt-cim] [PATCH 1 of 4] Replace printf() with CU_DEBUG in EAFP

Dan Smith danms at us.ibm.com
Tue Jan 8 15:07:21 UTC 2008


JG> I can't really comment on the necessity of these particular
JG> statements, but is there a way for use to print that value in a
JG> platform-independent way?

Yep, see inttypes.h.

"%hhu" was intended to be a byte, so PRIu8 would be the appropriate
selection here, used as follows:

  printf("Here is my byte: %" PRIu8 "\n", my_byte);

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080108/84d88166/attachment.sig>


More information about the Libvirt-cim mailing list