Clean up some dialyzer complaints

This commit is contained in:
Scott Lystig Fritchie 2015-06-23 17:26:15 +09:00
parent 727b2a987d
commit d3b0b7fdc5
2 changed files with 3 additions and 3 deletions

View file

@ -942,7 +942,7 @@ http_server_hack_put(Sock, G, FluName, MyURI) ->
machi_util:make_tagged_csum(server_sha, CSum0);
XX when is_binary(XX) ->
if XX == CSum0 ->
machi_util:make_tagged_csum(client_gen, CSum0);
machi_util:make_tagged_csum(client_sha, CSum0);
true ->
throw({bad_csum, XX})
end
@ -1025,7 +1025,7 @@ digest_header_goop([{http_header, _, 'Content-Length', _, Str}|T], G) ->
digest_header_goop(T, G#http_goop{len=list_to_integer(Str)});
digest_header_goop([{http_header, _, "X-Checksum", _, Str}|T], G) ->
SHA = machi_util:hexstr_to_bin(Str),
CSum = machi_util:make_tagged_csum(client_gen, SHA),
CSum = machi_util:make_tagged_csum(client_sha, SHA),
digest_header_goop(T, G#http_goop{x_csum=CSum});
digest_header_goop([_H|T], G) ->
digest_header_goop(T, G).

View file

@ -129,7 +129,7 @@ handle_call(connected_p, _From, #state{sock=undefined}=S) ->
handle_call({send_sync, _Cmd}, _From, #state{sock=undefined}=S) ->
{reply, not_connected, S};
handle_call({send_sync, Cmd}, _From, S) ->
{Reply, S2} = do_send_sync(Cmd, S),
{Reply, S2} = do_send_sync(Cmd, try_connect(S)),
{reply, Reply, S2};
handle_call(_Request, _From, S) ->
Reply = whaaaaaaaaaaaaaaaaaaaa,