[SSSD] [PATCH] Add support for explicit 32/64 bit numbers

Jakub Hrozek jhrozek at redhat.com
Tue Apr 13 12:19:50 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/12/2010 05:13 PM, Dmitri Pal wrote:
> Hello
> 
> The attached patch adds 4 conversion functions capable
> of handling the following types of the values:
> int32_t, int64_t, uint32_t and uint64_t
>

Ack to the code, but there is one thing to fix in the unit test:
the %lld format specifier for int64_t is correct on 32bit architectures
only, on 64bit the correct specifier is %ld - so the code emits a
compiler warning on 64bit.

Martin suggested that the values should be always casted up to long long
- - it will have some performance penalty, but since this is tracing code
only, it doesn't matter. If we ever need to print exact-sized values in
production code, we can use the C99 set of PRId64/PRId32 macros.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvEYWYACgkQHsardTLnvCWFsQCdEdVR0mpj/9VevTVNq7YebHIr
zP4AoJxF3TwaN/WMTiFKiVGBYQY8qniz
=BSVN
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list