From: H.J. Lu Date: Fri, 3 Feb 2012 18:07:42 +0000 (-0800) Subject: Print NULL for zero address in sys_mmap64 X-Git-Tag: v4.7~178 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0cd4436b0b174b0de59379f47dc20a2a75bf70a;p=strace 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. --- diff --git a/mem.c b/mem.c index e440e9ff..7fdd384e 100644 --- a/mem.c +++ b/mem.c @@ -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 */