#endif
);
if (new) /* piggy back alloc type */
- (unsigned long)new |= KM_TYPE;
+ new = (void *)(KM_TYPE | (unsigned long)new);
} else {
new = (void *)vmalloc(asize);
if (new) /* piggy back alloc type */
- (unsigned long)new |= VM_TYPE;
+ new = (void *)(VM_TYPE | (unsigned long)new);
}
if (!new) {
vfree(MEMADDR(p));
break;
default:
- printf("afs_osi_Free: Asked to free unknown type %d at 0x%x\n",
- MEMTYPE(p), MEMADDR(p));
+ printf("afs_osi_Free: Asked to free unknown type %d at 0x%lx\n",
+ (int)MEMTYPE(p), (unsigned long)MEMADDR(p));
break;
}
memtype = MEMTYPE(lmp->chunk);
if (memtype != KM_TYPE && memtype != VM_TYPE) {
printf
- ("osi_linux_verify_alloced_memory: unknown type %d at 0x%x, index=%d\n",
- memtype, lmp->chunk, index);
+ ("osi_linux_verify_alloced_memory: unknown type %d at 0x%lx, index=%lu\n",
+ (int)memtype, (unsigned long)lmp->chunk, (unsigned long)index);
}
afs_linux_hash_verify_count++;
}