From 1f9b5dc8e11449225e6abb45fb8659089502eef0 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 10 Sep 2014 10:15:15 +0200 Subject: Make dialyzer happier. Protocol version can be 0. --- include/plop.hrl | 4 ++-- src/plop.erl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/plop.hrl b/include/plop.hrl index 8985e79..b62a04a 100644 --- a/include/plop.hrl +++ b/include/plop.hrl @@ -15,14 +15,14 @@ %% get-entries requests and also the input to the hash function for %% leaf hashes in the tree. RFC 6962 sect 3.4. -record(mtl, { - version = ?PLOPVERSION :: pos_integer(), + version = ?PLOPVERSION :: non_neg_integer(), leaf_type = timestamped_entry :: leaf_type(), entry :: timestamped_entry() }). -type mtl() :: #mtl{}. -record(spt, { - version :: pos_integer(), % uint8 + version :: non_neg_integer(), % uint8 logid :: binary(), % SHA-256 over DER encoded public log key timestamp :: integer(), % uint64 signature :: signature() diff --git a/src/plop.erl b/src/plop.erl index 8377684..9100ce6 100644 --- a/src/plop.erl +++ b/src/plop.erl @@ -50,7 +50,7 @@ %% @doc The parts of an STH which is to be signed. Used as the %% interface to plop:sth/1, for testing. -record(sth_signed, { - version = ?PLOPVERSION :: pos_integer(), + version = ?PLOPVERSION :: non_neg_integer(), signature_type :: signature_type(), timestamp = now :: 'now' | integer(), tree_size :: integer(), @@ -61,7 +61,7 @@ %% @doc What's signed in an SPT. Used for serialisation before hasning %% and signing. FIXME: Overlapping #spt{} -- merge somehow? -record(spt_signed, { - version = ?PLOPVERSION :: pos_integer(), + version = ?PLOPVERSION :: non_neg_integer(), signature_type :: signature_type(), timestamp :: integer(), entry_type :: entry_type(), -- cgit v1.1