From 3d31d9b3fe569ceccfe82914792b90e413ef8d14 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 08:32:29 -0300
Subject: Replace NULL pointer constants with nullptr
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>
---
 flow/audioioalsa.cpp                    | 18 +++++++++---------
 flow/audioioesd.cpp                     |  8 ++++----
 flow/audioiomas.cpp                     |  4 ++--
 flow/audioionas.cpp                     | 22 +++++++++++-----------
 flow/audioioossthreaded.cpp             |  6 +++---
 flow/audioiosndio.cpp                   | 16 ++++++++--------
 flow/datahandle_impl.cpp                |  8 ++++----
 flow/gsl/gslglibhash.cpp                | 10 +++++-----
 flow/gsl/gslglibhashtest.cpp            |  2 +-
 flow/gslpp/datahandle.cpp               |  6 +++---
 flow/synth_play_wav_impl.cpp            |  2 +-
 mcop/debug.cpp                          |  2 +-
 mcop/mcoputils.cpp                      | 10 +++++-----
 mcop/object.cpp                         |  2 +-
 mcop/object.h                           |  2 +-
 mcop/tcpconnection.cpp                  |  4 ++--
 mcop/unixconnection.cpp                 |  2 +-
 mcop_mt/threads_posix.cpp               |  4 ++--
 mcopidl/yacc.cpp                        |  2 +-
 soundserver/cpuusage.cpp                |  4 ++--
 soundserver/crashhandler.cpp            |  4 ++--
 soundserver/soundserverstartup_impl.cpp |  2 +-
 x11/x11globalcomm_impl.cpp              |  2 +-
 23 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/flow/audioioalsa.cpp b/flow/audioioalsa.cpp
index 1c04e38..7577fe8 100644
--- a/flow/audioioalsa.cpp
+++ b/flow/audioioalsa.cpp
@@ -121,8 +121,8 @@ AudioIOALSA::AudioIOALSA()
 	 * default parameters
 	 */
 	m_format = SND_PCM_FORMAT_S16_LE;
-        m_pcm_playback = NULL;
-	m_pcm_capture = NULL;
+        m_pcm_playback = nullptr;
+	m_pcm_capture = nullptr;
 }
 
 bool AudioIOALSA::open()
@@ -136,8 +136,8 @@ bool AudioIOALSA::open()
 	int& _direction = param(direction);
 	int& _format = param(format);
 
-	m_pcm_playback = NULL;
-	m_pcm_capture = NULL;
+	m_pcm_playback = nullptr;
+	m_pcm_capture = nullptr;
 
 	/* initialize format */
 	switch(_format) {
@@ -239,28 +239,28 @@ void AudioIOALSA::close()
 	if ((_direction & directionRead) && m_pcm_capture) {
 		(void)snd_pcm_drop(m_pcm_capture);
 		(void)snd_pcm_close(m_pcm_capture);
-		m_pcm_capture = NULL;
+		m_pcm_capture = nullptr;
 	}
 	if ((_direction & directionWrite) && m_pcm_playback) {
 		(void)snd_pcm_drop(m_pcm_playback);
 		(void)snd_pcm_close(m_pcm_playback);
-		m_pcm_playback = NULL;
+		m_pcm_playback = nullptr;
 	}
 	Dispatcher::the()->ioManager()->remove(this, IOType::all);
 
 	delete[] audio_read_pds.pfds;
 	delete[] audio_write_pds.pfds;
-        audio_read_pds.pfds = NULL; audio_write_pds.pfds = NULL;
+        audio_read_pds.pfds = nullptr; audio_write_pds.pfds = nullptr;
         audio_read_pds.nfds = 0; audio_write_pds.nfds = 0;
 }
 
 void AudioIOALSA::setParam(AudioParam p, int& value)
 {
 	param(p) = value;
-        if (m_pcm_playback != NULL) {
+        if (m_pcm_playback) {
             setPcmParams(m_pcm_playback);
         }
-        if (m_pcm_capture != NULL) {
+        if (m_pcm_capture) {
             setPcmParams(m_pcm_capture);
         }
 }
diff --git a/flow/audioioesd.cpp b/flow/audioioesd.cpp
index 90b074d..c2f4e0c 100644
--- a/flow/audioioesd.cpp
+++ b/flow/audioioesd.cpp
@@ -111,7 +111,7 @@ bool AudioIOESD::open()
 	int& _format = param(format);
 	string& _error = paramStr(lastError);
 
-	if ((server_fd = esd_open_sound(NULL)) == -1)
+	if ((server_fd = esd_open_sound(nullptr)) == -1)
 	{
 		_error = "Couldn't connect to server";
 		return false;
@@ -119,7 +119,7 @@ bool AudioIOESD::open()
 
 	esd_server_info_t *server_info = esd_get_server_info(server_fd);
 
-	if (server_info == NULL)
+	if (!server_info)
 	{
 		_error = "Unable to query EsounD server";
 		return false;
@@ -136,7 +136,7 @@ bool AudioIOESD::open()
 	if (_direction & directionRead)
 	{
 		read_fd = esd_record_stream(server_format, _samplingRate,
-					    NULL, "aRts");
+					    nullptr, "aRts");
 		if (read_fd == -1)
 		{
 			_error = "Couldn't create read uflow";
@@ -147,7 +147,7 @@ bool AudioIOESD::open()
 	if (_direction & directionWrite)
 	{
 		write_fd = esd_play_stream(server_format, _samplingRate,
-					   NULL, "aRts");
+					   nullptr, "aRts");
 		if (write_fd == -1)
 		{
 			_error = "Couldn't create write flow";
diff --git a/flow/audioiomas.cpp b/flow/audioiomas.cpp
index cfebb65..cadc533 100644
--- a/flow/audioiomas.cpp
+++ b/flow/audioiomas.cpp
@@ -372,13 +372,13 @@ bool AudioIOMAS::open()
 
 	arts_debug("MAS output: BUFTIME_MS = %f", BUFTIME_MS);
 
-	masc_setup_package( &package, NULL, 0, 0 );
+	masc_setup_package( &package, nullptr, 0, 0 );
 	masc_pushk_uint32( &package, "buftime_ms", (uint32) BUFTIME_MS );
 	masc_finalize_package( &package );
 	mas_set( sbuf, "buftime_ms", &package );
 	masc_strike_package( &package );
 
-	masc_setup_package( &package, NULL, 0, 0 );
+	masc_setup_package( &package, nullptr, 0, 0 );
 	masc_pushk_int32( &package, "mc_clkid", 9 );
 	masc_finalize_package( &package );
 	mas_set( sbuf, "mc_clkid", &package );
diff --git a/flow/audioionas.cpp b/flow/audioionas.cpp
index 543d8c0..a13b58a 100644
--- a/flow/audioionas.cpp
+++ b/flow/audioionas.cpp
@@ -151,9 +151,9 @@ bool AudioIONAS::open()
 	}
 
 	aud = AuOpenServer(_device.compare("null") == 0 
-			   ? NULL : _device.c_str(), 
-			   0, NULL, 0, NULL, &server_msg);
-	if(aud == NULL)
+			   ? nullptr : _device.c_str(), 
+			   0, nullptr, 0, nullptr, &server_msg);
+	if(!aud)
 	{
 		_error = "device ";
 		_error += _device;
@@ -181,7 +181,7 @@ bool AudioIONAS::open()
 		return false;
 	}
 
-	if (!(flow = AuCreateFlow(aud, NULL)))
+	if (!(flow = AuCreateFlow(aud, nullptr)))
 	{
 		_error = "Couldn't create flow";
 		return false;
@@ -194,15 +194,15 @@ bool AudioIONAS::open()
 				  _channels, AuTrue,
 				  _buf_samples * _fragmentCount,
 				  _buf_samples * (_fragmentCount)/2,
-				  0, NULL);
+				  0, nullptr);
 	AuMakeElementExportDevice(&elements[1], 0, device, _samplingRate,
-				  AuUnlimitedSamples, 0, NULL);
-	AuSetElements(aud, flow, AuTrue, 2, elements, NULL);
+				  AuUnlimitedSamples, 0, nullptr);
+	AuSetElements(aud, flow, AuTrue, 2, elements, nullptr);
 	AuRegisterEventHandler(aud, AuEventHandlerIDMask, 0, flow,
 			       eventHandler, (AuPointer) this);
 
 	freeBytes = 0;
-	AuStartFlow(aud, flow, NULL);
+	AuStartFlow(aud, flow, nullptr);
 
 	Dispatcher::the()->ioManager()->watchFD(aud->fd, IOType::read, this);
 
@@ -213,9 +213,9 @@ bool AudioIONAS::open()
 void AudioIONAS::close()
 {
 	Dispatcher::the()->ioManager()->remove(this, IOType::all);
-	AuWriteElement(aud, flow, 0, 0, NULL, AuTrue, NULL);
+	AuWriteElement(aud, flow, 0, 0, nullptr, AuTrue, nullptr);
 	AuCloseServer(aud);
-	aud = NULL;
+	aud = nullptr;
 }
 
 void AudioIONAS::setParam(AudioParam p, int& value)
@@ -250,7 +250,7 @@ int AudioIONAS::write(void *buffer, int size)
 	if (size > freeBytes)
 		size = freeBytes;
 	if (size > 0)
-		AuWriteElement(aud, flow, 0, size, buffer, AuFalse, NULL);
+		AuWriteElement(aud, flow, 0, size, buffer, AuFalse, nullptr);
 	freeBytes -= size;
 	if (freeBytes > 0)
 		AudioSubSystem::the()->handleIO(AudioSubSystem::ioWrite);
diff --git a/flow/audioioossthreaded.cpp b/flow/audioioossthreaded.cpp
index 84697c7..d3513d4 100644
--- a/flow/audioioossthreaded.cpp
+++ b/flow/audioioossthreaded.cpp
@@ -589,7 +589,7 @@ void AudioIOOSSThreaded::WriterThread::run()
 			tmpBuf = parent->writerQueue.waitProduced();
 
 			if (!tmpBuf->size()) {
-				tmpBuf = NULL;
+				tmpBuf = nullptr;
 				parent->writerQueue.consumed();
 				continue;
 			}
@@ -599,7 +599,7 @@ void AudioIOOSSThreaded::WriterThread::run()
 
 		if (size >= 0) {
 			if (tmpBuf->push(size) == 0) {
-				tmpBuf = NULL;
+				tmpBuf = nullptr;
 				parent->writerQueue.consumed();
 			}
 		} else if (errno != EINTR) {
@@ -662,7 +662,7 @@ void AudioIOOSSThreaded::stopThread()
 		writerThread.stop();
 		// make sure there's something to write, avoids race condition
 		if (writerQueue.isEmpty())
-			writerQueue.write(NULL, 0);
+			writerQueue.write(nullptr, 0);
 		fprintf(stderr, "waiting for writerThread to finish\n");
 		writerThread.waitDone();
 		writerQueue.clear();
diff --git a/flow/audioiosndio.cpp b/flow/audioiosndio.cpp
index cfbdf10..3d4db8e 100644
--- a/flow/audioiosndio.cpp
+++ b/flow/audioiosndio.cpp
@@ -116,11 +116,11 @@ bool AudioIOSNDIO::open()
 	strlcpy(dev, _deviceName.c_str(), PATH_MAX);
 
 	if (strcmp(dev, "") == 0)
-		hdl = sio_open(NULL, mode, 0);
+		hdl = sio_open(nullptr, mode, 0);
 	else
 		hdl = sio_open(dev, mode, 0);
 
-	if (hdl == NULL) {
+	if (!hdl) {
 		_error = "device ";
 		if (strcmp(_deviceName.c_str(), "") == 0)
 			_error += "(default sndio device)";
@@ -200,7 +200,7 @@ bool AudioIOSNDIO::open()
 	::chans = par.pchan;
 	::realpos = ::playpos = ::recpos = 0;
 
-	sio_onmove(hdl, ::movecb, NULL);
+	sio_onmove(hdl, ::movecb, nullptr);
 
 	if (!sio_start(hdl)) {
 		_error = "sio_start failed";
@@ -217,9 +217,9 @@ bool AudioIOSNDIO::open()
 
 void AudioIOSNDIO::close()
 {
-	if (hdl != NULL) {
+	if (hdl) {
 		sio_close(hdl);
-		hdl = NULL;
+		hdl = nullptr;
 	}
 }
 
@@ -234,7 +234,7 @@ int AudioIOSNDIO::getParam(AudioParam p)
 	int n, events;
 
 	/* update ::realpos */
-	if ((p == canRead || p == canWrite) && hdl != NULL) {
+	if ((p == canRead || p == canWrite) && hdl) {
 		events = POLLOUT;
 		if (duplex)
 			events |= POLLIN;
@@ -264,7 +264,7 @@ int AudioIOSNDIO::getParam(AudioParam p)
 
 int AudioIOSNDIO::read(void *buffer, int size)
 {
-	arts_assert(hdl != NULL);
+	arts_assert(hdl);
 
 	size_t result;
 
@@ -277,7 +277,7 @@ int AudioIOSNDIO::read(void *buffer, int size)
 
 int AudioIOSNDIO::write(void *buffer, int size)
 {
-	arts_assert(hdl != NULL);
+	arts_assert(hdl);
 
 	size_t result;
 
diff --git a/flow/datahandle_impl.cpp b/flow/datahandle_impl.cpp
index ae13a75..3d7d7b4 100644
--- a/flow/datahandle_impl.cpp
+++ b/flow/datahandle_impl.cpp
@@ -167,8 +167,8 @@ public:
 	DataHandlePlay_impl()
 		: dhandle_(DataHandle::null()),
 		  gslDHandle_(GSL::DataHandle::null()),
-		  wchunk_(NULL),
-		  wosc_(NULL),
+		  wchunk_(nullptr),
+		  wosc_(nullptr),
 		  mixerFrequency_(0), // FIXME: doc says soundserver's freq
 		  channelIndex_(0),
 		  speed_(1.0f),
@@ -309,7 +309,7 @@ public:
 			arts_debug("DataHandlePlay_impl: close()ing gsl_wave_chunk");
 			gsl_wave_chunk_close(wchunk_);
 			gsl_wave_chunk_unref(wchunk_);
-			wchunk_ = NULL;
+			wchunk_ = nullptr;
 		}
 	}
 
@@ -346,7 +346,7 @@ public:
 		{
 			gsl_wave_osc_shutdown(wosc_);
 			delete wosc_;
-			wosc_ = NULL;
+			wosc_ = nullptr;
 		}
 	}
 
diff --git a/flow/gsl/gslglibhash.cpp b/flow/gsl/gslglibhash.cpp
index c933929..b0957ba 100644
--- a/flow/gsl/gslglibhash.cpp
+++ b/flow/gsl/gslglibhash.cpp
@@ -47,7 +47,7 @@ GHashTable* g_hash_table_new               (GHashFunc       hash_func,
 }
 void        g_hash_table_destroy           (GHashTable     *hash_table)
 {
-  g_return_if_fail (hash_table != NULL);
+  g_return_if_fail (hash_table);
 
   delete hash_table;
 }
@@ -55,7 +55,7 @@ void        g_hash_table_insert            (GHashTable     *hash_table,
 					    gpointer        key,
 					    gpointer        value)
 {
-  g_return_if_fail (hash_table != NULL);
+  g_return_if_fail (hash_table);
   guint hashvalue = hash_table->hashFunc (key);
 
   list< pair<gpointer,gpointer> >& bucket = hash_table->nodes[hashvalue];
@@ -88,7 +88,7 @@ void        g_hash_table_insert            (GHashTable     *hash_table,
 gpointer    g_hash_table_lookup            (GHashTable     *hash_table,
 					    gconstpointer   key)
 {
-  g_return_val_if_fail (hash_table != NULL, NULL);
+  g_return_val_if_fail (hash_table, nullptr);
 
   guint hashvalue = hash_table->hashFunc (key);
 
@@ -106,7 +106,7 @@ gpointer    g_hash_table_lookup            (GHashTable     *hash_table,
 gboolean    g_hash_table_remove            (GHashTable     *hash_table,
 					    gconstpointer   key)
 {
-  g_return_val_if_fail (hash_table != NULL, FALSE);
+  g_return_val_if_fail (hash_table, FALSE);
 
   guint hashvalue = hash_table->hashFunc (key);
 
@@ -134,7 +134,7 @@ void        g_hash_table_foreach           (GHashTable     *hash_table,
 {
   map<guint, list< pair<gpointer,gpointer> > >::iterator bi;
 
-  g_return_if_fail (hash_table != NULL);
+  g_return_if_fail (hash_table);
 
   /* for all buckets */
   for (bi = hash_table->nodes.begin (); bi != hash_table->nodes.end (); bi++)
diff --git a/flow/gsl/gslglibhashtest.cpp b/flow/gsl/gslglibhashtest.cpp
index 9205c8c..fde88b9 100644
--- a/flow/gsl/gslglibhashtest.cpp
+++ b/flow/gsl/gslglibhashtest.cpp
@@ -42,7 +42,7 @@ void fail_func (gpointer key, gpointer value, gpointer user_data) {
 
 
 void count_func (gpointer key, gpointer value, gpointer user_data) {
-  g_assert (value != NULL && key != NULL);
+  g_assert (value && key);
 	for(int i=0;i<50;i++)
 	{
 		if(strcmp((char *)key, test[i].key) == 0)
diff --git a/flow/gslpp/datahandle.cpp b/flow/gslpp/datahandle.cpp
index dfda7e6..ae294d9 100644
--- a/flow/gslpp/datahandle.cpp
+++ b/flow/gslpp/datahandle.cpp
@@ -350,14 +350,14 @@ GslErrorType WaveFileInfo::error() const
 // ----------------------------------------------------------------------------
 
 WaveDataHandle::WaveDataHandle()
-	: DataHandle(NULL),
+	: DataHandle(nullptr),
 	  oscillatorFrequency_(0),
 	  mixerFrequency_(0)
 {
 }
 
 WaveDataHandle::WaveDataHandle(const GslWaveDsc *waveDesc, guint chunkIndex)
-	: DataHandle(NULL),
+	: DataHandle(nullptr),
 	  oscillatorFrequency_(0),
 	  mixerFrequency_(0)
 {
@@ -373,7 +373,7 @@ WaveDataHandle::WaveDataHandle(const GslWaveDsc *waveDesc, guint chunkIndex)
 WaveDataHandle::WaveDataHandle(const std::string& filename,
 							   guint waveIndex,
 							   guint chunkIndex)
-	: DataHandle(NULL),
+	: DataHandle(nullptr),
 	  oscillatorFrequency_(0),
 	  mixerFrequency_(0)
 {
diff --git a/flow/synth_play_wav_impl.cpp b/flow/synth_play_wav_impl.cpp
index dec68f0..f8707aa 100644
--- a/flow/synth_play_wav_impl.cpp
+++ b/flow/synth_play_wav_impl.cpp
@@ -106,7 +106,7 @@ CachedWav::CachedWav(Cache *cache, string filename) : CachedObject(cache),
 		return;
 	}
 
-	file = afOpenFile(filename.c_str(), "r", NULL);
+	file = afOpenFile(filename.c_str(), "r", nullptr);
 	if(!file)
 	{
 		arts_info("CachedWav: Can't read file '%s'", filename.c_str());
diff --git a/mcop/debug.cpp b/mcop/debug.cpp
index d2d00f8..eba492b 100644
--- a/mcop/debug.cpp
+++ b/mcop/debug.cpp
@@ -791,7 +791,7 @@ arts_strdup_vprintf (const char *format, va_list args1)
   gchar *buffer;
 #ifdef HAVE_VASPRINTF
   if (vasprintf (&buffer, format, args1) < 0)
-    buffer = NULL;
+    buffer = nullptr;
 #else
   va_list args2;
 
diff --git a/mcop/mcoputils.cpp b/mcop/mcoputils.cpp
index 52eb78f..9e9e565 100644
--- a/mcop/mcoputils.cpp
+++ b/mcop/mcoputils.cpp
@@ -169,7 +169,7 @@ static char *locate_mcop_dir()
 
   /* kde_tmp_dir is a link. Check whether it points to a valid directory. */
   ssize_t size = 2048;
-  tmp_buf = NULL;
+  tmp_buf = nullptr;
   do {
      size *= 2;
      tmp_buf = (char *) realloc(tmp_buf, size);
@@ -307,7 +307,7 @@ int build_link(string tmp_prefix, const char *kde_prefix)
      unlink(kde_tmp_dir.c_str());
      user_tmp_dir += "XXXXXX";
      tmp_buf = strdup(user_tmp_dir.c_str());
-     if (mkdtemp(tmp_buf) == NULL)
+     if (!mkdtemp(tmp_buf))
 	 return 1;
      result = create_link(kde_tmp_dir.c_str(), tmp_buf);
      free(tmp_buf);
@@ -320,7 +320,7 @@ int build_link(string tmp_prefix, const char *kde_prefix)
   }
   /* kde_tmp_dir is a link. Check whether it points to a valid directory. */
   ssize_t size = 2048;
-  tmp_buf = NULL;
+  tmp_buf = nullptr;
   do {
      size *= 2;
      tmp_buf = (char *) realloc(tmp_buf, size);
@@ -348,7 +348,7 @@ int build_link(string tmp_prefix, const char *kde_prefix)
      unlink(kde_tmp_dir.c_str());
      user_tmp_dir += "XXXXXX";
      tmp_buf = strdup(user_tmp_dir.c_str());
-     if (mkdtemp(tmp_buf) == NULL)
+     if (!mkdtemp(tmp_buf))
 	 return 1;
      result = create_link(kde_tmp_dir.c_str(), tmp_buf);
      free(tmp_buf);
@@ -360,7 +360,7 @@ int build_link(string tmp_prefix, const char *kde_prefix)
   unlink(kde_tmp_dir.c_str());
   user_tmp_dir += "XXXXXX";
   tmp_buf = strdup(user_tmp_dir.c_str());
-  if (mkdtemp(tmp_buf) == NULL)
+  if (!mkdtemp(tmp_buf))
       return 1;
   result = create_link(kde_tmp_dir.c_str(), tmp_buf);
   free(tmp_buf);
diff --git a/mcop/object.cpp b/mcop/object.cpp
index a50061e..220119f 100644
--- a/mcop/object.cpp
+++ b/mcop/object.cpp
@@ -1135,7 +1135,7 @@ Object_stub::~Object_stub()
 		for(long p=0;p<_lookupMethodCacheSize;p++)
 		{
 			if(_lookupMethodCache[p].obj == this)
-				_lookupMethodCache[p].obj = NULL;
+				_lookupMethodCache[p].obj = nullptr;
 		}
 	}
 	_connection->_release();
diff --git a/mcop/object.h b/mcop/object.h
index f67bc67..e0421c6 100644
--- a/mcop/object.h
+++ b/mcop/object.h
@@ -323,7 +323,7 @@ protected:
 
 	enum { _lookupMethodCacheSize = 337 };
 	static struct methodCacheEntry {
-		methodCacheEntry() : obj(NULL),method(NULL),ID(0) {} ;
+		methodCacheEntry() : obj(nullptr),method(nullptr),ID(0) {} ;
 		Object_stub *obj;
 		const char *method;
 		long ID;
diff --git a/mcop/tcpconnection.cpp b/mcop/tcpconnection.cpp
index 722ed2c..d4d170a 100644
--- a/mcop/tcpconnection.cpp
+++ b/mcop/tcpconnection.cpp
@@ -52,13 +52,13 @@ static struct sockaddr_in *parse_tcp_url(const char *url)
 		return 0;
 	}
 
-	char *host = strtok(NULL,":");
+	char *host = strtok(nullptr,":");
 	if(host == 0) {
 		free(work);
 		return 0;
 	}
 
-	char *port = strtok(NULL,":\n");
+	char *port = strtok(nullptr,":\n");
 	if(port == 0) {
 		free(work);
 		return 0;
diff --git a/mcop/unixconnection.cpp b/mcop/unixconnection.cpp
index 38464d3..368f53c 100644
--- a/mcop/unixconnection.cpp
+++ b/mcop/unixconnection.cpp
@@ -46,7 +46,7 @@ static struct sockaddr_un *parse_unix_url(const char *url)
 	    return 0;
 	}
 
-	char *path = strtok(NULL,":\n");
+	char *path = strtok(nullptr,":\n");
 	if(path == 0) {
 	    free(work);
 	    return 0;
diff --git a/mcop_mt/threads_posix.cpp b/mcop_mt/threads_posix.cpp
index e3ae4d2..b763fb8 100644
--- a/mcop_mt/threads_posix.cpp
+++ b/mcop_mt/threads_posix.cpp
@@ -346,7 +346,7 @@ static void pth_mutex_init (GslMutex *mutex)
 	/* need NULL attribute here, which is the fast mutex on glibc
 	 * and cannot be chosen through the pthread_mutexattr_settype()
 	 */
-	pthread_mutex_init ((pthread_mutex_t*) mutex, NULL);
+	pthread_mutex_init ((pthread_mutex_t*) mutex, nullptr);
 }
 static void pth_rec_mutex_init (GslRecMutex *mutex)
 {
@@ -359,7 +359,7 @@ static void pth_rec_mutex_init (GslRecMutex *mutex)
 }
 static void pth_rec_cond_init (GslCond *cond)
 {
-	pthread_cond_init ((pthread_cond_t*) cond, NULL);
+	pthread_cond_init ((pthread_cond_t*) cond, nullptr);
 }
 static void pth_rec_cond_wait_timed (GslCond *cond, GslMutex *mutex,
 									 gulong abs_secs, gulong abs_usecs)
diff --git a/mcopidl/yacc.cpp b/mcopidl/yacc.cpp
index 6b94d18..95a6987 100644
--- a/mcopidl/yacc.cpp
+++ b/mcopidl/yacc.cpp
@@ -224,7 +224,7 @@ static const char * const yytname[] = {   "$","error","$undefined.","T_STRUCT",
 "moduledef","@6","@7","classbody","attributedef","maybereadonly","maybeoneway",
 "maybedefault","streamdef","defaultdef","direction","methoddef","paramdefs",
 "paramdefs1","paramdef","identifierlist","interfacelist","interfacelistelem",
-"structbody","type","simpletype","epsilon", NULL
+"structbody","type","simpletype","epsilon", nullptr
 };
 #endif
 
diff --git a/soundserver/cpuusage.cpp b/soundserver/cpuusage.cpp
index c08baba..030b54f 100644
--- a/soundserver/cpuusage.cpp
+++ b/soundserver/cpuusage.cpp
@@ -42,11 +42,11 @@ private:
 public:
 	void start()
 	{
-		gettimeofday(&_start,NULL);
+		gettimeofday(&_start,nullptr);
 	}
 	float stop()
 	{
-		gettimeofday(&_stop,NULL);
+		gettimeofday(&_stop,nullptr);
 
 		float diff = _stop.tv_sec-_start.tv_sec;
 		diff += (float)(_stop.tv_usec-_start.tv_usec)/1000000;
diff --git a/soundserver/crashhandler.cpp b/soundserver/crashhandler.cpp
index 5864d89..807a4c2 100644
--- a/soundserver/crashhandler.cpp
+++ b/soundserver/crashhandler.cpp
@@ -193,7 +193,7 @@ CrashHandler::defaultCrashHandler (int sig)
           }
 
           // NULL terminated list
-          argv[i++] = NULL;
+          argv[i++] = nullptr;
 
           setgid(getgid());
           if (getuid() != geteuid())
@@ -217,7 +217,7 @@ CrashHandler::defaultCrashHandler (int sig)
 
  		  fprintf(stderr, "ArtsCrash: ... waiting for child to exit\n");
           // wait for child to exit
-          waitpid(pid, NULL, 0);
+          waitpid(pid, nullptr, 0);
           _exit(253);
         }
       }
diff --git a/soundserver/soundserverstartup_impl.cpp b/soundserver/soundserverstartup_impl.cpp
index 89f5dbd..c7ba099 100644
--- a/soundserver/soundserverstartup_impl.cpp
+++ b/soundserver/soundserverstartup_impl.cpp
@@ -36,7 +36,7 @@ SoundServerStartup_impl::SoundServerStartup_impl()
 	 * our purposes
 	 */
 	timeval tv;
-	gettimeofday(&tv, NULL);
+	gettimeofday(&tv, nullptr);
 
 	int pid = getpid();
 	srand(tv.tv_sec);
diff --git a/x11/x11globalcomm_impl.cpp b/x11/x11globalcomm_impl.cpp
index 8d5e620..0c73e6f 100644
--- a/x11/x11globalcomm_impl.cpp
+++ b/x11/x11globalcomm_impl.cpp
@@ -52,7 +52,7 @@ protected:
 public:
 	X11GlobalComm_impl() :rootWin(0), atom(0)
 	{
-		X11display = XOpenDisplay(NULL);
+		X11display = XOpenDisplay(nullptr);
 		if(!X11display)
 		{
 		  warn("Can't connect to the XServer - Initial references won't work.");
-- 
cgit v1.2.3

