Print NULL for zero address in sys_mmap64

* mem.c (sys_mmap64): Print NULL for zero address so that it is
consistent with sys_mmap.
This commit is contained in:
H.J. Lu 2012-02-03 10:07:42 -08:00 committed by Dmitry V. Levin
parent 309edeb2e1
commit d0cd4436b0

5
mem.c
View File

@ -352,7 +352,10 @@ sys_mmap64(struct tcb *tcp)
return 0;
#endif
/* addr */
tprintf("%#lx, ", u_arg[0]);
if (!u_arg[0])
tprints("NULL, ");
else
tprintf("%#lx, ", u_arg[0]);
/* len */
tprintf("%lu, ", u_arg[1]);
/* prot */