From 011ddf96fabd64a1dad51b7183ea29fb3ee1cc19 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Wed, 1 Mar 2017 15:15:51 -0600 Subject: [PATCH] style: change NULL to nullptr in syscall files Change-Id: I02719f3572f6665cace1eb5681f297dcde9e71ce Reviewed-on: https://gem5-review.googlesource.com/2271 Reviewed-by: Andreas Sandberg Reviewed-by: Michael LeBeane Reviewed-by: Tony Gutierrez Maintainer: Jason Lowe-Power --- src/sim/syscall_emul.cc | 4 ++-- src/sim/syscall_emul.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 4cf17a266..8736176ed 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -889,7 +889,7 @@ setpgidFunc(SyscallDesc *desc, int callnum, Process *process, return 0; } - Process *matched_ph = NULL; + Process *matched_ph = nullptr; System *sysh = tc->getSystemPtr(); // Retrieves process pointer from active/suspended thread contexts. @@ -903,7 +903,7 @@ setpgidFunc(SyscallDesc *desc, int callnum, Process *process, } } - assert(matched_ph != NULL); + assert(matched_ph); matched_ph->setpgid((pgid == 0) ? matched_ph->pid() : pgid); return 0; diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index a0fb7e4ed..a1c3b2905 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1484,7 +1484,7 @@ mmapImpl(SyscallDesc *desc, int num, Process *p, ThreadContext *tc, return -EBADF; sim_fd = ffdp->getSimFD(); - pmap = (decltype(pmap))mmap(NULL, length, PROT_READ, MAP_PRIVATE, + pmap = (decltype(pmap))mmap(nullptr, length, PROT_READ, MAP_PRIVATE, sim_fd, offset); if (pmap == (decltype(pmap))-1) { -- 2.30.2