From 7ad37a2220e160f0a209b75d6c8ddc7ac3d08c3a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 8 Dec 2011 11:50:00 +0100 Subject: allow pointcode2int() for a pointcode that's already in integer format this simplifies the callers... --- src/osmo_util.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osmo_util.erl b/src/osmo_util.erl index ed6dfad..3c12952 100644 --- a/src/osmo_util.erl +++ b/src/osmo_util.erl @@ -143,6 +143,8 @@ make_prim(Subsys, GenName, SpecName, Param) -> spec_name = SpecName, parameters = Param}. % parse a 3-tuple pointcode into a raw integer +pointcode2int(Int) when is_integer(Int) -> + Int; pointcode2int(#pointcode{repr=Type, value=Value}) -> pointcode2int(Type, Value); pointcode2int({Std, Param}) -> -- cgit v1.2.3