diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtledeviceinquiry.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtledeviceinquiry.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtledeviceinquiry.mm	2020-07-22 16:02:52.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtledeviceinquiry.mm	2019-12-02 21:15:16.000000000 +1030
@@ -139,7 +139,7 @@
 
 - (void)dealloc
 {
-    if (manager != NULL) {
+    if (manager) {
         [manager setDelegate:nil];
         if (internalState == InquiryActive)
             [manager stopScan];
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtperipheralmanager.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtperipheralmanager.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtperipheralmanager.mm	2020-07-22 16:03:07.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/osx/osxbtperipheralmanager.mm	2019-12-02 21:15:16.000000000 +1030
@@ -313,7 +313,7 @@
 - (void)startAdvertising
 {
     state = PeripheralState::waitingForPowerOn;
-    if (manager != NULL)
+    if (manager)
         [manager setDelegate:nil];
     manager.reset([[CBPeripheralManager alloc] initWithDelegate:self
                    queue:OSXBluetooth::qt_LE_queue()]);
@@ -378,7 +378,7 @@
 
 - (void) addServicesToPeripheral
 {
-    Q_ASSERT(manager != NULL);
+    Q_ASSERT(manager);
 
     if (nextServiceToAdd < services.size())
         [manager addService:services[nextServiceToAdd++]];
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm	2020-07-22 16:03:58.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -181,7 +181,7 @@
 
 QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate()
 {
-    if (inquiryLE != NULL && agentState != NonActive) {
+    if (inquiryLE && agentState != NonActive) {
         // We want the LE scan to stop as soon as possible.
         if (dispatch_queue_t leQueue = OSXBluetooth::qt_LE_queue()) {
             // Local variable to be retained ...
@@ -195,7 +195,7 @@
 
 bool QBluetoothDeviceDiscoveryAgentPrivate::isValid() const
 {
-    return hostController != NULL && [hostController powerState] == kBluetoothHCIPowerStateON;
+    return hostController && [hostController powerState] == kBluetoothHCIPowerStateON;
 }
 
 bool QBluetoothDeviceDiscoveryAgentPrivate::isActive() const
@@ -292,7 +292,7 @@
 
     // Check queue and create scanner:
     inquiryLE.reset([[LEDeviceInquiryObjC alloc] initWithNotifier:notifier.data()]);
-    if (inquiryLE != NULL)
+    if (inquiryLE)
         notifier.take(); // Whatever happens next, inquiryLE is already the owner ...
 
     dispatch_queue_t leQueue(qt_LE_queue());
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothlocaldevice_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothlocaldevice_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothlocaldevice_osx.mm	2020-07-22 16:03:30.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothlocaldevice_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -149,7 +149,7 @@
 
 bool QBluetoothLocalDevicePrivate::isValid() const
 {
-    return hostController != NULL;
+    return hostController;
 }
 
 void QBluetoothLocalDevicePrivate::requestPairing(const QBluetoothAddress &address, Pairing pairing)
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserver_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserver_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserver_osx.mm	2020-07-22 16:07:38.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserver_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -142,7 +142,7 @@
 
 void QBluetoothServerPrivate::openNotify(IOBluetoothRFCOMMChannel *channel)
 {
-    Q_ASSERT_X(listener != NULL, Q_FUNC_INFO, "invalid listener (nil)");
+    Q_ASSERT_X(listener, Q_FUNC_INFO, "invalid listener (nil)");
     Q_ASSERT_X(channel, Q_FUNC_INFO, "invalid channel (nil)");
     Q_ASSERT_X(q_ptr, Q_FUNC_INFO, "invalid q_ptr (null)");
 
@@ -154,7 +154,7 @@
 
 void QBluetoothServerPrivate::openNotify(IOBluetoothL2CAPChannel *channel)
 {
-    Q_ASSERT_X(listener != NULL, Q_FUNC_INFO, "invalid listener (nil)");
+    Q_ASSERT_X(listener, Q_FUNC_INFO, "invalid listener (nil)");
     Q_ASSERT_X(channel, Q_FUNC_INFO, "invalid channel (nil)");
     Q_ASSERT_X(q_ptr, Q_FUNC_INFO, "invalid q_ptr (null)");
 
@@ -293,7 +293,7 @@
 
     OSXBluetooth::qt_test_iobluetooth_runloop();
 
-    if (d_ptr->listener != NULL) {
+    if (d_ptr->listener) {
         qCWarning(QT_BT_OSX) << "already in listen mode, close server first";
         return false;
     }
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserviceinfo_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserviceinfo_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserviceinfo_osx.mm	2020-07-22 16:04:11.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothserviceinfo_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -172,7 +172,7 @@
     if (!registered)
         return false;
 
-    Q_ASSERT_X(serviceRecord != NULL, Q_FUNC_INFO, "service registered, but serviceRecord is nil");
+    Q_ASSERT_X(serviceRecord, Q_FUNC_INFO, "service registered, but serviceRecord is nil");
 
     [serviceRecord removeServiceRecord];
 
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothsocket_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothsocket_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothsocket_osx.mm	2020-07-22 16:09:34.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothsocket_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -103,13 +103,13 @@
 
     if (socketType == QBluetoothServiceInfo::RfcommProtocol) {
         rfcommChannel.reset([[ObjCRFCOMMChannel alloc] initWithDelegate:this]);
-        if (rfcommChannel != NULL)
+        if (rfcommChannel)
             status = [rfcommChannel connectAsyncToDevice:address withChannelID:port];
         else
             status = kIOReturnNoMemory;
     } else if (socketType == QBluetoothServiceInfo::L2capProtocol) {
         l2capChannel.reset([[ObjCL2CAPChannel alloc] initWithDelegate:this]);
-        if (l2capChannel != NULL)
+        if (l2capChannel)
             status = [l2capChannel connectAsyncToDevice:address withPSM:port];
         else
             status = kIOReturnNoMemory;
@@ -183,10 +183,10 @@
 
     NSString *nsName = nil;
     if (socketType == QBluetoothServiceInfo::RfcommProtocol) {
-        if (rfcommChannel != NULL)
+        if (rfcommChannel)
             nsName = [rfcommChannel peerName];
     } else if (socketType == QBluetoothServiceInfo::L2capProtocol) {
-        if (l2capChannel != NULL)
+        if (l2capChannel)
             nsName = [l2capChannel peerName];
     }
 
@@ -200,10 +200,10 @@
 {
     BluetoothDeviceAddress addr = {};
     if (socketType == QBluetoothServiceInfo::RfcommProtocol) {
-        if (rfcommChannel != NULL)
+        if (rfcommChannel)
             addr = [rfcommChannel peerAddress];
     } else if (socketType == QBluetoothServiceInfo::L2capProtocol) {
-        if (l2capChannel != NULL)
+        if (l2capChannel)
             addr = [l2capChannel peerAddress];
     }
 
@@ -213,10 +213,10 @@
 quint16 QBluetoothSocketPrivate::peerPort() const
 {
     if (socketType == QBluetoothServiceInfo::RfcommProtocol) {
-        if (rfcommChannel != NULL)
+        if (rfcommChannel)
             return [rfcommChannel getChannelID];
     } else if (socketType == QBluetoothServiceInfo::L2capProtocol) {
-        if (l2capChannel != NULL)
+        if (l2capChannel)
             return [l2capChannel getPSM];
     }
 
@@ -233,7 +233,7 @@
     Q_ASSERT_X(socketType == QBluetoothServiceInfo::L2capProtocol
                || socketType == QBluetoothServiceInfo::RfcommProtocol,
                Q_FUNC_INFO, "invalid socket type");
-    Q_ASSERT_X(l2capChannel != NULL || rfcommChannel != NULL, Q_FUNC_INFO,
+    Q_ASSERT_X(l2capChannel || rfcommChannel, Q_FUNC_INFO,
                "invalid socket (no open channel)");
     Q_ASSERT_X(q_ptr, Q_FUNC_INFO, "invalid q_ptr (null)");
 
@@ -277,13 +277,13 @@
 
     openMode = QIODevice::ReadWrite;
     rfcommChannel.reset([[ObjCRFCOMMChannel alloc] initWithDelegate:this channel:channel]);
-    if (rfcommChannel != NULL) {// We do not handle errors, up to an external user.
+    if (rfcommChannel) {// We do not handle errors, up to an external user.
         q_ptr->setOpenMode(QIODevice::ReadWrite);
         state = QBluetoothSocket::ConnectedState;
         socketType = QBluetoothServiceInfo::RfcommProtocol;
     }
 
-    return rfcommChannel != NULL;
+    return rfcommChannel;
 }
 
 bool QBluetoothSocketPrivate::setChannel(IOBluetoothL2CAPChannel *channel)
@@ -301,13 +301,13 @@
 
     openMode = QIODevice::ReadWrite;
     l2capChannel.reset([[ObjCL2CAPChannel alloc] initWithDelegate:this channel:channel]);
-    if (l2capChannel != NULL) {// We do not handle errors, up to an external user.
+    if (l2capChannel) {// We do not handle errors, up to an external user.
         q_ptr->setOpenMode(QIODevice::ReadWrite);
         state = QBluetoothSocket::ConnectedState;
         socketType = QBluetoothServiceInfo::L2capProtocol;
     }
 
-    return l2capChannel != NULL;
+    return l2capChannel;
 }
 
 
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothtransferreply_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothtransferreply_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothtransferreply_osx.mm	2020-07-22 16:04:59.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qbluetoothtransferreply_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -136,13 +136,13 @@
     // The OBEX session will be closed then. If
     // somehow IOBluetooth/OBEX still has a reference to our
     // session, it will not call any of delegate's callbacks.
-    if (session != NULL)
+    if (session)
         [session closeSession];
 }
 
 bool QBluetoothTransferReplyOSXPrivate::isActive() const
 {
-    return agent || (session != NULL && [session hasActiveRequest]);
+    return agent || (session && [session hasActiveRequest]);
 }
 
 bool QBluetoothTransferReplyOSXPrivate::startOPP(const QBluetoothAddress &device)
@@ -218,7 +218,7 @@
 void QBluetoothTransferReplyOSXPrivate::sendPut()
 {
     Q_ASSERT_X(inputStream, Q_FUNC_INFO, "invalid input stream (null)");
-    Q_ASSERT_X(session != NULL, Q_FUNC_INFO, "invalid OBEX session (nil)");
+    Q_ASSERT_X(session, Q_FUNC_INFO, "invalid OBEX session (nil)");
     Q_ASSERT_X([session isConnected], Q_FUNC_INFO, "not connected");
     Q_ASSERT_X(![session hasActiveRequest], Q_FUNC_INFO,
                "session already has an active request");
@@ -268,7 +268,7 @@
     Q_UNUSED(errorCode)
     Q_UNUSED(response)
 
-    if (session != NULL) {
+    if (session) {
         setReplyError(QBluetoothTransferReply::SessionError,
                       QCoreApplication::translate(TRANSFER_REPLY, TR_CONNECT_FAILED));
     } else {
diff -ur /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qlowenergycontroller_osx.mm /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qlowenergycontroller_osx.mm
--- /tmp/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qlowenergycontroller_osx.mm	2020-07-22 16:10:26.000000000 +0930
+++ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt59/qt59-qtconnectivity/work/qtconnectivity-opensource-src-5.9.9/src/bluetooth/qlowenergycontroller_osx.mm	2019-12-02 21:15:16.000000000 +1030
@@ -200,7 +200,7 @@
 #ifdef Q_OS_TVOS
     return centralManager;
 #else
-    return centralManager != NULL || peripheralManager != NULL;
+    return centralManager || peripheralManager;
 #endif
 }
 
