]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/comm/Read.cc
Maintenance: Removed most NULLs using modernize-use-nullptr (#1075)
[thirdparty/squid.git] / src / comm / Read.cc
index 910ff6c54a49c9e6b7767010e66fc38702d36496..5e3a4ba12cecb3a1704233a0eb179b504a610cb4 100644 (file)
@@ -28,7 +28,7 @@
 bool
 Comm::MonitorsRead(int fd)
 {
-    assert(isOpen(fd) && COMMIO_FD_READCB(fd) != NULL);
+    assert(isOpen(fd) && COMMIO_FD_READCB(fd) != nullptr);
     // Being active is usually the same as monitoring because we always
     // start monitoring the FD when we configure Comm::IoCallback for I/O
     // and we usually configure Comm::IoCallback for I/O when we starting
@@ -41,7 +41,7 @@ Comm::Read(const Comm::ConnectionPointer &conn, AsyncCall::Pointer &callback)
 {
     // TODO: move comm_read_base() internals into here
     // when comm_read() char* API is no longer needed
-    comm_read_base(conn, NULL, 0, callback);
+    comm_read_base(conn, nullptr, 0, callback);
 }
 
 /**
@@ -66,14 +66,14 @@ comm_read_base(const Comm::ConnectionPointer &conn, char *buf, int size, AsyncCa
     // Active/passive conflicts are OK and simply cancel passive monitoring.
     if (ccb->active()) {
         // if the assertion below fails, we have an active comm_read conflict
-        assert(fd_table[conn->fd].halfClosedReader != NULL);
+        assert(fd_table[conn->fd].halfClosedReader != nullptr);
         commStopHalfClosedMonitor(conn->fd);
         assert(!ccb->active());
     }
     ccb->conn = conn;
 
     /* Queue the read */
-    ccb->setCallback(Comm::IOCB_READ, callback, (char *)buf, NULL, size);
+    ccb->setCallback(Comm::IOCB_READ, callback, (char *)buf, nullptr, size);
     Comm::SetSelect(conn->fd, COMM_SELECT_READ, Comm::HandleRead, ccb, 0);
 }
 
@@ -212,7 +212,7 @@ comm_read_cancel(int fd, IOCB *callback, void *data)
     cb->cancel("old comm_read_cancel");
 
     /* And the IO event */
-    Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
+    Comm::SetSelect(fd, COMM_SELECT_READ, nullptr, nullptr, 0);
 }
 
 void
@@ -241,7 +241,7 @@ Comm::ReadCancel(int fd, AsyncCall::Pointer &callback)
     cb->cancel("comm_read_cancel");
 
     /* And the IO event */
-    Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
+    Comm::SetSelect(fd, COMM_SELECT_READ, nullptr, nullptr, 0);
 }
 
 time_t