libosmo-cc: Fixed NULL-pointer bug

This commit is contained in:
Andreas Eversberg 2022-12-16 12:37:32 +01:00 committed by Gitea
parent 893b064fbb
commit ba48b2e67d
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@
#define _OSMO_CC_NAME2VALUE(array) { \
int value; \
for (value = 0; (size_t)value < (sizeof(array) / sizeof(array[0])); value++) { \
if (!array[value]) \
continue; \
if (!strcasecmp(array[value], name)) \
return value; \
} \