1
1
/*
2
- * Copyright (C) 2009-2014,2016,2018,2020 by Jonathan Naylor G4KLX
2
+ * Copyright (C) 2009-2014,2016,2018,2020,2025 by Jonathan Naylor G4KLX
3
3
*
4
4
* This program is free software; you can redistribute it and/or modify
5
5
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ m_seen1(false),
45
45
m_seen2(false ),
46
46
m_seen3(false ),
47
47
m_seen4(false ),
48
- m_sacch(NULL ),
48
+ m_sacch(nullptr ),
49
49
m_sessionId(1U ),
50
50
m_seqNo(0U ),
51
51
m_ssrc(0U ),
@@ -106,7 +106,7 @@ bool CKenwoodNetwork::open()
106
106
107
107
bool CKenwoodNetwork::write (const unsigned char * data, unsigned int length)
108
108
{
109
- assert (data != NULL );
109
+ assert (data != nullptr );
110
110
111
111
switch (data[0U ]) {
112
112
case 0x81U : // Voice header or trailer
@@ -122,7 +122,7 @@ bool CKenwoodNetwork::write(const unsigned char* data, unsigned int length)
122
122
123
123
bool CKenwoodNetwork::processIcomVoiceHeader (const unsigned char * inData)
124
124
{
125
- assert (inData != NULL );
125
+ assert (inData != nullptr );
126
126
127
127
unsigned char outData[30U ];
128
128
::memset (outData, 0x00U , 30U );
@@ -166,7 +166,7 @@ bool CKenwoodNetwork::processIcomVoiceHeader(const unsigned char* inData)
166
166
167
167
bool CKenwoodNetwork::processIcomVoiceData (const unsigned char * inData)
168
168
{
169
- assert (inData != NULL );
169
+ assert (inData != nullptr );
170
170
171
171
unsigned char outData[40U ], temp[10U ];
172
172
::memset (outData, 0x00U , 40U );
@@ -246,7 +246,7 @@ bool CKenwoodNetwork::processIcomVoiceData(const unsigned char* inData)
246
246
247
247
bool CKenwoodNetwork::writeRTPVoiceHeader (const unsigned char * data)
248
248
{
249
- assert (data != NULL );
249
+ assert (data != nullptr );
250
250
251
251
unsigned char buffer[50U ];
252
252
::memset (buffer, 0x00U , 50U );
@@ -293,7 +293,7 @@ bool CKenwoodNetwork::writeRTPVoiceHeader(const unsigned char* data)
293
293
294
294
bool CKenwoodNetwork::writeRTPVoiceTrailer (const unsigned char * data)
295
295
{
296
- assert (data != NULL );
296
+ assert (data != nullptr );
297
297
298
298
unsigned char buffer[50U ];
299
299
::memset (buffer, 0x00U , 50U );
@@ -339,7 +339,7 @@ bool CKenwoodNetwork::writeRTPVoiceTrailer(const unsigned char* data)
339
339
340
340
bool CKenwoodNetwork::writeRTPVoiceData (const unsigned char * data)
341
341
{
342
- assert (data != NULL );
342
+ assert (data != nullptr );
343
343
344
344
unsigned char buffer[60U ];
345
345
::memset (buffer, 0x00U , 60U );
@@ -397,7 +397,7 @@ bool CKenwoodNetwork::writeRTCPStart()
397
397
m_startUSecs = st.wMilliseconds * 1000U ;
398
398
#else
399
399
struct timeval tod;
400
- ::gettimeofday (&tod, NULL );
400
+ ::gettimeofday (&tod, nullptr );
401
401
402
402
m_startSecs = tod.tv_sec ;
403
403
m_startUSecs = tod.tv_usec ;
@@ -530,7 +530,7 @@ bool CKenwoodNetwork::writeRTCPHang()
530
530
531
531
unsigned int CKenwoodNetwork::read (unsigned char * data)
532
532
{
533
- assert (data != NULL );
533
+ assert (data != nullptr );
534
534
535
535
unsigned char dummy[BUFFER_LENGTH];
536
536
readRTCP (dummy);
@@ -556,7 +556,7 @@ unsigned int CKenwoodNetwork::read(unsigned char* data)
556
556
557
557
unsigned int CKenwoodNetwork::readRTP (unsigned char * data)
558
558
{
559
- assert (data != NULL );
559
+ assert (data != nullptr );
560
560
561
561
unsigned char buffer[BUFFER_LENGTH];
562
562
@@ -582,7 +582,7 @@ unsigned int CKenwoodNetwork::readRTP(unsigned char* data)
582
582
583
583
unsigned int CKenwoodNetwork::readRTCP (unsigned char * data)
584
584
{
585
- assert (data != NULL );
585
+ assert (data != nullptr );
586
586
587
587
unsigned char buffer[BUFFER_LENGTH];
588
588
@@ -639,7 +639,7 @@ void CKenwoodNetwork::clock(unsigned int ms)
639
639
640
640
unsigned int CKenwoodNetwork::processKenwoodVoiceHeader (unsigned char * inData)
641
641
{
642
- assert (inData != NULL );
642
+ assert (inData != nullptr );
643
643
644
644
unsigned char outData[50U ], temp[20U ];
645
645
::memset (outData, 0x00U , 50U );
@@ -696,7 +696,7 @@ unsigned int CKenwoodNetwork::processKenwoodVoiceHeader(unsigned char* inData)
696
696
697
697
unsigned int CKenwoodNetwork::processKenwoodVoiceData (unsigned char * inData)
698
698
{
699
- assert (inData != NULL );
699
+ assert (inData != nullptr );
700
700
701
701
unsigned char outData[50U ], temp[20U ];
702
702
::memset (outData, 0x00U , 50U );
@@ -846,7 +846,7 @@ unsigned long CKenwoodNetwork::getTimeStamp() const
846
846
timeStamp += ms * 80U ;
847
847
#else
848
848
struct timeval tod;
849
- ::gettimeofday (&tod, NULL );
849
+ ::gettimeofday (&tod, nullptr );
850
850
851
851
unsigned int ss = tod.tv_sec ;
852
852
unsigned int ms = tod.tv_usec / 1000U ;
@@ -860,7 +860,7 @@ unsigned long CKenwoodNetwork::getTimeStamp() const
860
860
861
861
unsigned int CKenwoodNetwork::processKenwoodVoiceLateEntry (unsigned char * inData)
862
862
{
863
- assert (inData != NULL );
863
+ assert (inData != nullptr );
864
864
865
865
unsigned char sacch[4U ];
866
866
sacch[0U ] = inData[12U ];
0 commit comments