diff options
author | falkTX <falktx@falktx.com> | 2019-10-28 11:47:39 +0100 |
---|---|---|
committer | Filipe Coelho <falktx@falktx.com> | 2019-10-29 08:39:37 +0100 |
commit | f55b975481a2c587e99e2bdab07b833a9819ecc5 (patch) | |
tree | d7160db50224040b818048a5a2860d8e07c52d2b | |
parent | 3009d7d6067d8feaabde3e9ac76c67d36c6c463a (diff) | |
download | jack2-f55b975481a2c587e99e2bdab07b833a9819ecc5.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; } |