Coverage Report

Created: 2026-11-12 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/sbi/openapi/model/psa_indication.c
Line
Count
Source
1
2
#include <stdlib.h>
3
#include <string.h>
4
#include <stdio.h>
5
#include "psa_indication.h"
6
7
char* OpenAPI_psa_indication_ToString(OpenAPI_psa_indication_e psa_indication)
8
0
{
9
0
    const char *psa_indicationArray[] =  { "NULL", "PSA_INSERTED", "PSA_REMOVED", "PSA_INSERTED_ONLY", "PSA_REMOVED_ONLY" };
10
0
    size_t sizeofArray = sizeof(psa_indicationArray) / sizeof(psa_indicationArray[0]);
11
0
    if (psa_indication < sizeofArray)
12
0
        return (char *)psa_indicationArray[psa_indication];
13
0
    else
14
0
        return (char *)"Unknown";
15
0
}
16
17
OpenAPI_psa_indication_e OpenAPI_psa_indication_FromString(char* psa_indication)
18
0
{
19
0
    int stringToReturn = 0;
20
0
    const char *psa_indicationArray[] =  { "NULL", "PSA_INSERTED", "PSA_REMOVED", "PSA_INSERTED_ONLY", "PSA_REMOVED_ONLY" };
21
0
    size_t sizeofArray = sizeof(psa_indicationArray) / sizeof(psa_indicationArray[0]);
22
0
    while (stringToReturn < sizeofArray) {
23
0
        if (strcmp(psa_indication, psa_indicationArray[stringToReturn]) == 0) {
24
0
            return stringToReturn;
25
0
        }
26
0
        stringToReturn++;
27
0
    }
28
0
    return 0;
29
0
}
30