Alexandre Julliard (@julliard) commented about tools/winedump/pdb.c:
- }
- printf("\n\tIndexes => hash value:\n");
- for (i = types->first_index; i < types->last_index; i++)
- {
printf("\t\t%08x => ", i);
pdb_dump_hash_value((const BYTE*)hash + types->hash_offset + (i - types->first_index) * types->hash_size, types->hash_size);
printf("\n");
- }
- /* print collisions in hash table (if any) */
- collision = malloc((types->last_index - types->first_index) * sizeof(unsigned));
- if (collision)
- {
struct collision_arg arg = {(const BYTE*)hash + types->hash_offset, types->hash_size};
unsigned head_printed = 0;
for (i = 0; i < types->last_index - types->first_index; i++) collision[i] = i;
qsort_r(collision, types->last_index - types->first_index, sizeof(unsigned), collision_compar, &arg);
Please don't use qsort_r, it's not portable.