mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Add more asserts to catch bugs.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "Log.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -858,6 +859,8 @@ bool CModem::setFrequency()
|
||||
|
||||
RESP_TYPE_MMDVM CModem::getResponse(unsigned char *buffer, unsigned int& length)
|
||||
{
|
||||
assert(buffer != NULL);
|
||||
|
||||
// Get the start of the frame or nothing at all
|
||||
int ret = m_serial.read(buffer + 0U, 1U);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user