From f55b975481a2c587e99e2bdab07b833a9819ecc5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Oct 2019 11:47:39 +0100 Subject: [PATCH] Small fix on code style --- common/JackPortType.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/JackPortType.cpp b/common/JackPortType.cpp index 092b4c6b..940ef492 100644 --- a/common/JackPortType.cpp +++ b/common/JackPortType.cpp @@ -36,7 +36,7 @@ jack_port_type_id_t GetPortTypeId(const char* port_type) { for (jack_port_type_id_t i = 0; i < PORT_TYPES_MAX; ++i) { const JackPortType* type = gPortTypes[i]; - assert(type != 0); + assert(type != NULL); if (strcmp(port_type, type->fName) == 0) { return i; } @@ -46,9 +46,10 @@ jack_port_type_id_t GetPortTypeId(const char* port_type) const JackPortType* GetPortType(jack_port_type_id_t type_id) { - assert(type_id >= 0 && type_id <= PORT_TYPES_MAX); + if (type_id >= PORT_TYPES_MAX) + return NULL; const JackPortType* type = gPortTypes[type_id]; - assert(type != 0); + assert(type != NULL); return type; } -- 2.11.4.GIT