diff options
author | falkTX <falktx@falktx.com> | 2019-10-28 11:47:39 +0100 |
---|---|---|
committer | falkTX <falktx@falktx.com> | 2019-10-28 11:47:39 +0100 |
commit | f100fcb620387f517a94718cecc1d32cd8c20311 (patch) | |
tree | d7160db50224040b818048a5a2860d8e07c52d2b | |
parent | 93619ed0c528e0f1e30513505bc0e8611c3ec2e8 (diff) | |
download | jack2-f100fcb620387f517a94718cecc1d32cd8c20311.tar.gz |
Small fix on code style
-rw-r--r-- | common/JackPortType.cpp | 7 |
1 files 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; } |