aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/auth.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-16 14:16:53 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-21 14:02:07 +0000
commitb42dc43e288b33cb0ba467fccbe50d1de8eef878 (patch)
treeb42257e0f83f15eea76998bbe9f8619c841b54a3 /openbsc/src/libmsc/auth.c
parent9fdb4e5f2ff9349f5b5c60b61bfff28a05ae3e4d (diff)
use new OSMO_VALUE_STRING
libosmocore change-id I857af45ae602bb9a647ba26cf8b0d1b23403b54c adds OSMO_VALUE_STRING to compose value_string arrays with the exact enum names as entries. Use instead of identical local macros in two places. Change-Id: I1b44d2a3f293785a01d6a587c78f9e0cbeec70c3
Diffstat (limited to 'openbsc/src/libmsc/auth.c')
-rw-r--r--openbsc/src/libmsc/auth.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/openbsc/src/libmsc/auth.c b/openbsc/src/libmsc/auth.c
index 3b1fd738a..bf62d3c47 100644
--- a/openbsc/src/libmsc/auth.c
+++ b/openbsc/src/libmsc/auth.c
@@ -26,19 +26,18 @@
#include <openbsc/gsm_data.h>
#include <osmocom/gsm/comp128.h>
+#include <osmocom/core/utils.h>
#include <openssl/rand.h>
#include <stdlib.h>
const struct value_string auth_action_names[] = {
-#define AUTH_ACTION_STR(X) { X, #X }
- AUTH_ACTION_STR(AUTH_ERROR),
- AUTH_ACTION_STR(AUTH_NOT_AVAIL),
- AUTH_ACTION_STR(AUTH_DO_AUTH_THEN_CIPH),
- AUTH_ACTION_STR(AUTH_DO_CIPH),
- AUTH_ACTION_STR(AUTH_DO_AUTH),
-#undef AUTH_ACTION_STR
+ OSMO_VALUE_STRING(AUTH_ERROR),
+ OSMO_VALUE_STRING(AUTH_NOT_AVAIL),
+ OSMO_VALUE_STRING(AUTH_DO_AUTH_THEN_CIPH),
+ OSMO_VALUE_STRING(AUTH_DO_CIPH),
+ OSMO_VALUE_STRING(AUTH_DO_AUTH),
{ 0, NULL }
};