style: change NULL to nullptr in syscall files
authorBrandon Potter <Brandon.Potter@amd.com>
Wed, 1 Mar 2017 21:15:51 +0000 (15:15 -0600)
committerBrandon Potter <Brandon.Potter@amd.com>
Thu, 9 Mar 2017 22:42:45 +0000 (22:42 +0000)
Change-Id: I02719f3572f6665cace1eb5681f297dcde9e71ce
Reviewed-on: https://gem5-review.googlesource.com/2271
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/sim/syscall_emul.cc
src/sim/syscall_emul.hh

index 4cf17a26620e4fa944cea8e032acc65eb45d9890..8736176edbd12c8d0b4b082c8b2dd5d6566104cf 100644 (file)
@@ -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;
index a0fb7e4ed0d307bba982b56a8e6e26ecfc3e0565..a1c3b29050203ba156d18e9cfaca31138dd9d29e 100644 (file)
@@ -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) {