From 53afc71ffd9b7a8757dbfbe4d8391cb65b7eabfb Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 8 Nov 2026 08:04:33 -0300
Subject: Replace NULL pointer constants in address book components
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 kaddressbook/interfaces/xxport.h      |  2 +-
 kaddressbook/xxport/gnokii_xxport.cpp | 10 +++++-----
 kaddressbook/xxport/pab_mapihd.cpp    |  4 ++--
 kaddressbook/xxport/pab_pablib.cpp    |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/kaddressbook/interfaces/xxport.h b/kaddressbook/interfaces/xxport.h
index e46d8d5f7..8f4d306e8 100644
--- a/kaddressbook/interfaces/xxport.h
+++ b/kaddressbook/interfaces/xxport.h
@@ -60,7 +60,7 @@ class TDEApplication;
   @see: K_EXPORT_COMPONENT_FACTORY()
  */
 #define K_EXPORT_KADDRESSBOOK_XXFILTER( libname, XXPortClass ) \
-	K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libname, XXPortClass, NULL )
+	K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libname, XXPortClass, nullptr )
 	
 
 namespace KAB {
diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp
index 6559aaecf..1d5458dcc 100644
--- a/kaddressbook/xxport/gnokii_xxport.cpp
+++ b/kaddressbook/xxport/gnokii_xxport.cpp
@@ -81,7 +81,7 @@ GNOKIIXXPort::GNOKIIXXPort( TDEABC::AddressBook *ab, TQWidget *parent, const cha
   : KAB::XXPort( ab, parent, name )
 {
 	this_filter = this;
-	m_progressDlg = NULL;
+	m_progressDlg = nullptr;
 	createImportAction( i18n( "Import From Mobile Phone..." ) );
 	createExportAction( i18n( "Export to Mobile Phone..." ) );
 }
@@ -129,7 +129,7 @@ static TQString businit(void)
 	GNOKII_DEBUG( TQString("Compiled with libgnokii version 0x%1\n").arg(TQString::number(LIBGNOKII_VERSION,16)) );
 	GNOKII_DEBUG( TQString("Using libgnokii runtime version 0x%1\n").arg(TQString::number(gn_lib_version(),16)) );
 
-	gn_error error = gn_lib_phoneprofile_load(NULL, &state);
+	gn_error error = gn_lib_phoneprofile_load(nullptr, &state);
 	if (error) 
 		return i18n("Failed to initialize the gnokii library.");
 
@@ -790,7 +790,7 @@ finish:
 /* OLD GNOKII LIBRARIES (< 0.6.13) */
 
 /* import */
-static char *lockfile = NULL;
+static char *lockfile = nullptr;
 static char manufacturer[64], model[GN_MODEL_MAX_LENGTH+1],
             revision[GN_REVISION_MAX_LENGTH+1], imei[GN_IMEI_MAX_LENGTH+1];
 static TQString PhoneProductId;
@@ -800,7 +800,7 @@ static gn_data data;
 
 static void busterminate(void)
 {
-	gn_sm_functions(GN_OP_Terminate, NULL, &state);
+	gn_sm_functions(GN_OP_Terminate, nullptr, &state);
 	if (lockfile) gn_device_unlock(lockfile);
 }
 
@@ -831,7 +831,7 @@ static TQString businit(void)
 	// Defaults to 'no'
 	if (aux && !strcmp(aux, "yes")) {
 		lockfile = gn_device_lock(state.config.port_device);
-		if (lockfile == NULL) {
+		if (!lockfile) {
 			return i18n("Gnokii reports a 'Lock File Error'.\n "
 			"Please exit all other running instances of gnokii, check if you have "
 			"write permissions in the /var/lock directory and try again.");
diff --git a/kaddressbook/xxport/pab_mapihd.cpp b/kaddressbook/xxport/pab_mapihd.cpp
index 9f1879b87..2245c7ae8 100644
--- a/kaddressbook/xxport/pab_mapihd.cpp
+++ b/kaddressbook/xxport/pab_mapihd.cpp
@@ -134,7 +134,7 @@ static word_t *mapi_map[]={ map_givenname, map_email,
                      map_organization, map_department, map_subdep, map_job,
                      map_notes,
                      map_notused,
-                     NULL
+                     nullptr
                    };
 
 pabrec_entry mapitag_t::matchTag(void)
@@ -142,7 +142,7 @@ pabrec_entry mapitag_t::matchTag(void)
 int          i,j;
 pabrec_entry e=pr_unknown;
 
-  for(i=0;mapi_map[i]!=NULL && e==pr_unknown;i++) {
+  for (i = 0; mapi_map[i] && e == pr_unknown; i++) {
     for(j=1;mapi_map[i][j]!=0 && _tag!=mapi_map[i][j];j++);
     if (mapi_map[i][j]!=0) {
       e=(pabrec_entry) mapi_map[i][0];
diff --git a/kaddressbook/xxport/pab_pablib.cpp b/kaddressbook/xxport/pab_pablib.cpp
index bae854c29..179d680dd 100644
--- a/kaddressbook/xxport/pab_pablib.cpp
+++ b/kaddressbook/xxport/pab_pablib.cpp
@@ -189,7 +189,7 @@ content_t hdr;
    hdr=go(REC);
    if (upper(hdr)==REC_OK) {    // Now read a record and instantiate!
      pabrec       rec(*this);
-     pabfields_t  fields(rec, NULL);
+     pabfields_t  fields(rec, nullptr);
 
      if (fields.isOK() && fields.isUsable()) {
        // f->addContact( fields.get() );
-- 
cgit v1.2.3

