nghash cleanup, use `%p' to print a pointer value

This commit is contained in:
rlar 2011-07-17 11:20:31 +00:00
parent a057ea7bd4
commit 56287d9a1d
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2011-07-17 Robert Larice
* src/misc/hash.c :
nghash cleanup, use `%p' to print a pointer value
2011-07-17 Robert Larice
* src/include/hash.h ,
* src/misc/hash.c :

View File

@ -708,12 +708,12 @@ void nghash_dump(NGHASHPTR htable, void (*print_key) (void *))
if( htable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) {
fprintf( stderr, " key:%s ", (char *) hptr->key ) ;
} else {
fprintf( stderr, " key:%0lx ", (unsigned long) hptr->key ) ;
fprintf( stderr, " key:%p ", hptr->key ) ;
}
if( print_key) {
print_key (hptr->data);
} else {
fprintf( stderr, " data:%0lx ", (unsigned long) hptr->data ) ;
fprintf( stderr, " data:%p ", hptr->data ) ;
}
}
fprintf( stderr, "\n" ) ;