summaryrefslogtreecommitdiff
path: root/gsmdecode/src/id_list.c
blob: 6736993f1d36cb1542a4b50d2f64f3aafcf478aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "common.h"
#include <string.h>
#include "id_list.h"

const char *
id_list_get(struct _id_list *id_list, int id)
{
	struct _id_list *idptr = id_list;

	while (idptr->string != NULL)
	{
		if (idptr->id == id)
			return idptr->string;
		idptr++;
	}

	return "UNKNOWN";
}

personal git repositories of Harald Welte. Your mileage may vary