summaryrefslogtreecommitdiffstats
path: root/src/dabInputFifo.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-28 23:44:15 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-28 23:44:15 +0200
commit32bdfb274ec20318dd7d45fb62cd6e51323453f7 (patch)
tree1142386bf9fb2f90738876cc3e572c0be353c868 /src/dabInputFifo.cpp
parentf0b272d734469552b9747ec3e00a5a3a22811749 (diff)
downloaddabmux-32bdfb274ec20318dd7d45fb62cd6e51323453f7.tar.gz
dabmux-32bdfb274ec20318dd7d45fb62cd6e51323453f7.tar.bz2
dabmux-32bdfb274ec20318dd7d45fb62cd6e51323453f7.zip
Replace NULL by nullptr
Diffstat (limited to 'src/dabInputFifo.cpp')
-rw-r--r--src/dabInputFifo.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/dabInputFifo.cpp b/src/dabInputFifo.cpp
index 3e35c20..7e07731 100644
--- a/src/dabInputFifo.cpp
+++ b/src/dabInputFifo.cpp
@@ -61,9 +61,9 @@ int dabInputFifoInit(void** args)
data->curSize = 0;
data->head = 0;
data->tail = 0;
- data->buffer = NULL;
- data->packetData = NULL;
- data->enhancedPacketData = NULL;
+ data->buffer = nullptr;
+ data->packetData = nullptr;
+ data->enhancedPacketData = nullptr;
data->packetLength = 0;
data->enhancedPacketLength = 0;
data->enhancedPacketWaiting = 0;
@@ -145,7 +145,7 @@ int dabInputFifoOpen(void* args, const char* filename)
return -1;
}
#else
- if (pthread_create(&data->thread, NULL, dabInputFifoThread, data)) {
+ if (pthread_create(&data->thread, nullptr, dabInputFifoThread, data)) {
perror("Can't create FIFO child");
return -1;
}
@@ -166,7 +166,7 @@ int dabInputFifoSetbuf(void* args, int size)
sem_wait(&data->semBuffer);
#endif
}
- if (data->buffer != NULL) {
+ if (data->buffer != nullptr) {
delete data->buffer;
}
if (size == 0) {
@@ -367,7 +367,7 @@ int dabInputFifoClean(void** args)
}
#else
if (data->thread != (pthread_t)NULL) {
- if (pthread_join(data->thread, NULL)) {
+ if (pthread_join(data->thread, nullptr)) {
etiLog.log(debug, "ERROR: FIFO child thread had not exit normally\n");
}
}
@@ -382,12 +382,12 @@ int dabInputFifoClean(void** args)
sem_destroy(&data->semFull);
sem_destroy(&data->semBuffer);
#endif
- if (data->packetData != NULL) {
+ if (data->packetData != nullptr) {
delete[] data->packetData;
}
- if (data->enhancedPacketData != NULL) {
+ if (data->enhancedPacketData != nullptr) {
for (int i = 0; i < 12; ++i) {
- if (data->enhancedPacketData[i] != NULL) {
+ if (data->enhancedPacketData[i] != nullptr) {
delete[] data->enhancedPacketData[i];
}
}
@@ -505,7 +505,7 @@ void* dabInputFifoThread(void* args)
sem_post(&data->semBuffer);
#endif
}
- return NULL;
+ return nullptr;
}