I'm using the code as shown below
if (strcmp(oid, ".1.3.6.1.4.1.53864.1.1.0") == 0)
{
return 1;
}
else if (strcmp(oid, ".1.3.6.1.4.1.53864.1.2.0") == 0)
{
return 2;
}
...
else if (strcmp(oid, ".1.3.6.1.4.1.53864.1.n.0") == 0)
{
return n;
}
Now the problem is updated n value is 250. Can anyone please give me any idea to reduce this else if statement?
I tried to search on StackOverflow but those answers are related to the other languages and I want an idea that I can implement in the C language.