From 834af61b7d73822c82054faec1b78161c3a5185d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 3 Jul 2018 08:14:37 +0100 Subject: [PATCH 1/3] Release m_tsdu in the P25 NID processing. --- P25NID.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/P25NID.cpp b/P25NID.cpp index 7e4f1e8..bc41f0b 100644 --- a/P25NID.cpp +++ b/P25NID.cpp @@ -95,6 +95,7 @@ CP25NID::~CP25NID() delete[] m_ldu2; delete[] m_termlc; delete[] m_term; + delete[] m_tsdu; delete[] m_pdu; } From 7bb1409498c7ce80bacaee10309f89480d2590a3 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 4 Jul 2018 21:36:21 +0100 Subject: [PATCH 2/3] Restore the correct copyright message. --- StopWatch.cpp | 4 +++- StopWatch.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/StopWatch.cpp b/StopWatch.cpp index 2f15645..eb32961 100644 --- a/StopWatch.cpp +++ b/StopWatch.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,7 +74,9 @@ unsigned int CStopWatch::elapsed() { struct timespec now; ::clock_gettime(CLOCK_MONOTONIC, &now); + int offset = ((now.tv_sec - m_start.tv_sec) * 1000000000UL + now.tv_nsec - m_start.tv_nsec ) / 1000000UL; + return (unsigned int)offset; } diff --git a/StopWatch.h b/StopWatch.h index a1e2bf8..554f91c 100644 --- a/StopWatch.h +++ b/StopWatch.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From d1b5e73406b273dd851de721229c0959f03c0c2b Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 4 Jul 2018 21:41:31 +0100 Subject: [PATCH 3/3] Fix Linux compiler warning. --- P25NID.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/P25NID.cpp b/P25NID.cpp index dba8fb1..db48449 100644 --- a/P25NID.cpp +++ b/P25NID.cpp @@ -34,8 +34,8 @@ m_ldu1(NULL), m_ldu2(NULL), m_termlc(NULL), m_term(NULL), -m_pdu(NULL), -m_tsdu(NULL) +m_tsdu(NULL), +m_pdu(NULL) { CBCH bch;