]> granicus.if.org Git - ejabberd/commitdiff
Replace TYPE/1 with is_TYPE/1 (EJAB-922)
authorBadlop <badlop@process-one.net>
Thu, 10 Sep 2009 22:38:37 +0000 (22:38 +0000)
committerBadlop <badlop@process-one.net>
Thu, 10 Sep 2009 22:38:37 +0000 (22:38 +0000)
SVN Revision: 2596

src/mod_pubsub/node_hometree_odbc.erl

index e102c291ac987c2a9251f0423f3bb7b831726277..ce839a13257e6cf7b0679520736a291c81ed01d7 100644 (file)
@@ -1350,12 +1350,12 @@ raw_to_item(NodeId, {ItemId, SJID, Creation, Modification, XML}) ->
                 modification={ToTime(Modification), JID},
                 payload = Payload}.
 
-l2i(L) when list(L) -> list_to_integer(L);
-l2i(I) when integer(I) -> I.
-i2l(I) when integer(I) -> integer_to_list(I);
-i2l(L) when list(L)    -> L.
-i2l(I, N) when integer(I) -> i2l(i2l(I), N);
-i2l(L, N) when list(L) ->
+l2i(L) when is_list(L) -> list_to_integer(L);
+l2i(I) when is_integer(I) -> I.
+i2l(I) when is_integer(I) -> integer_to_list(I);
+i2l(L) when is_list(L)    -> L.
+i2l(I, N) when is_integer(I) -> i2l(i2l(I), N);
+i2l(L, N) when is_list(L) ->
     case length(L) of
        N -> L;
        C when C > N -> L;