From 12c8a2748fb47168e19e2600772fea46b73eebed Mon Sep 17 00:00:00 2001 From: Dmitri Pal Date: Mon, 26 Mar 2012 17:41:19 -0400 Subject: Do not debug padding The header structure might contain padding to align data on the boundary of the word. It is unsafe to always print the header data as it might be uninitialized. I do not want to remove it as it might be handy some day so I prefer to #ifdef it. --- collection/collection_tools.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'collection') diff --git a/collection/collection_tools.c b/collection/collection_tools.c index 7352b3a..b7f30d2 100644 --- a/collection/collection_tools.c +++ b/collection/collection_tools.c @@ -129,8 +129,11 @@ int col_debug_handle(const char *property, ((struct collection_header *)(data))->count, ((struct collection_header *)(data))->reference_count, ((struct collection_header *)(data))->cclass); +/* Due to padding issues this is unsafe so ifdefed for now */ +#ifdef COL_PRINT_BINARY_HEADER for (i = 0; i < length; i++) printf("%02X", ((unsigned char *)(data))[i]); +#endif printf(" (%d)\n", nest_level); break; case COL_TYPE_COLLECTIONREF: -- cgit