mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Print pointers with %p instead of casting them to an unsigned int and
then printing them with 0x%x which doesn't work when sizeof(void *) > sizeof(int).
This commit is contained in:
parent
1786a481d7
commit
40e8bd8c76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106578
@ -799,8 +799,8 @@ tdfx_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||
int retval = 0;
|
||||
struct tdfx_pio_data *piod = (struct tdfx_pio_data*)data;
|
||||
#ifdef DEBUG
|
||||
printf("IOCTL'd by #%d, cmd: 0x%x, data: 0x%x\n", td->td_proc->p_pid, (u_int32_t)cmd,
|
||||
(unsigned int)piod);
|
||||
printf("IOCTL'd by #%d, cmd: 0x%x, data: %p\n", td->td_proc->p_pid, (u_int32_t)cmd,
|
||||
piod);
|
||||
#endif
|
||||
switch(_IOC_TYPE(cmd)) {
|
||||
/* Return the real error if negative, or simply stick the valid return
|
||||
|
Loading…
Reference in New Issue
Block a user