diff options
author | Anders Svensson <[email protected]> | 2016-03-07 22:35:46 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-03-07 22:52:25 +0100 |
commit | 073d4a8a08b1cfad7720511b10819ec2db76aeb7 (patch) | |
tree | 975ecef3eebb5a3c5980320a85772f5f4cea490c /lib/diameter/src/base/diameter_service.erl | |
parent | 184bc747089398d7fd74aef9bce48b42e8e71464 (diff) | |
download | otp-073d4a8a08b1cfad7720511b10819ec2db76aeb7.tar.gz otp-073d4a8a08b1cfad7720511b10819ec2db76aeb7.tar.bz2 otp-073d4a8a08b1cfad7720511b10819ec2db76aeb7.zip |
Fix dialyzer warnings
Whether making record declarations unreadable to compensate for
dialyzer's ignorance of match specs is worth it is truly debatable.
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index 66c4a7582f..87ef2e522d 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -137,16 +137,16 @@ peer = false :: match(boolean() | pid())}). %% true at accepted, pid() at okay/reopen -%% Record representing an Peer State Machine processes implemented by +%% Record representing a Peer State Machine processes implemented by %% diameter_peer_fsm. -record(peer, - {pid :: pid(), - apps :: [{0..16#FFFFFFFF, diameter:app_alias()}] %% {Id, Alias} - | [diameter:app_alias()], %% remote - caps :: #diameter_caps{}, - started = diameter_lib:now(), %% at process start or sharing - watchdog :: pid() %% key into watchdogT - | undefined}). %% undefined if remote + {pid :: pid(), + apps :: match([{0..16#FFFFFFFF, diameter:app_alias()}] %% {Id, Alias} + | [diameter:app_alias()]), %% remote + caps :: match(#diameter_caps{}), + started = diameter_lib:now(), %% at process start or sharing + watchdog :: match(pid() %% key into watchdogT + | undefined)}). %% undefined if remote %% --------------------------------------------------------------------------- %% # start/1 @@ -583,8 +583,7 @@ init_peers({PeerT, _, _} = T, F) PeerT); %% Populate #peer{} table given a shared peers dict. -init_peers({PeerT, _, _}, SDict) - when is_integer(SDict) -> +init_peers({PeerT, _, _}, SDict) -> dict:fold(fun(P, As, N) -> ets:update_element(PeerT, P, {#peer.apps, As}), N+1 |