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

Jay Gagnon grendel at linux.vnet.ibm.com
Tue Jan 8 14:07:04 UTC 2008


Dan Smith wrote:
> KR> # HG changeset patch
> KR> # User Kaitlin Rupert <karupert at us.ibm.com>
> KR> # Date 1199740240 28800
> KR> # Node ID 7281142059a1c419405addd2ba351c68fb719ff0
> KR> # Parent  abcb596636c9530009756b1aa1e8900a2f01d10e
> KR> Replace printf() with CU_DEBUG in EAFP.
>
> I'm all for cleanups of this fashion.  However,
>
> KR> -                printf("Device %hhi:%s", type, dev_id);
> KR> +                CU_DEBUG("Device %hhi:%s", type, dev_id);
>
> This looks like crufty debug that uses a platform-dependent bit-width
> anyway.  This and the rest in this file should probably be excised
> instead of formalized.  What do you think?
>
>   
I can't really comment on the necessity of these particular statements,
but is there a way for use to print that value in a platform-independent
way?

-- 

-Jay




More information about the Libvirt-cim mailing list