Branch data Line data Source code
1 : : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
2 : : * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
3 : : */
4 : :
5 : : #include "SolidSyslogErrorName.h"
6 : :
7 : : #include <stddef.h>
8 : : #include <stdint.h>
9 : :
10 : 1037 : const char* SolidSyslogErrorName_Lookup(const char* const * names, int32_t count, int32_t detail)
11 : : {
12 : 1037 : const char* name = NULL;
13 [ + + + + ]: 1037 : if ((detail >= 0) && (detail < count))
14 : : {
15 : 987 : name = names[detail];
16 : : }
17 : 1037 : return name;
18 : : }
|