aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/disk_log.erl
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2016-11-16 15:11:45 +0100
committerRichard Carlsson <[email protected]>2016-11-29 10:31:43 +0100
commit3900d246682a46cec3b4dcf4c1b13259038ab358 (patch)
tree28ee18a381b8de359a909ef4363de8ddbbb75b84 /lib/kernel/src/disk_log.erl
parent9bb7aee366b04f6e8b6ea8491c0d7ebbdb304bb6 (diff)
downloadotp-3900d246682a46cec3b4dcf4c1b13259038ab358.tar.gz
otp-3900d246682a46cec3b4dcf4c1b13259038ab358.tar.bz2
otp-3900d246682a46cec3b4dcf4c1b13259038ab358.zip
Simplify for rflat
Diffstat (limited to 'lib/kernel/src/disk_log.erl')
-rw-r--r--lib/kernel/src/disk_log.erl11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/kernel/src/disk_log.erl b/lib/kernel/src/disk_log.erl
index bc31f1fbbd..2a7afb4c53 100644
--- a/lib/kernel/src/disk_log.erl
+++ b/lib/kernel/src/disk_log.erl
@@ -125,13 +125,13 @@ open(A) ->
Log :: log(),
Term :: term().
log(Log, Term) ->
- req(Log, {log, term_to_binary(Term)}).
+ req(Log, {log, [term_to_binary(Term)]}).
-spec blog(Log, Bytes) -> ok | {error, Reason :: log_error_rsn()} when
Log :: log(),
Bytes :: iodata().
blog(Log, Bytes) ->
- req(Log, {blog, ensure_binary(Bytes)}).
+ req(Log, {blog, [ensure_binary(Bytes)]}).
-spec log_terms(Log, TermList) -> ok | {error, Resaon :: log_error_rsn()} when
Log :: log(),
@@ -154,7 +154,7 @@ blog_terms(Log, Bytess) ->
Log :: log(),
Term :: term().
alog(Log, Term) ->
- notify(Log, {alog, term_to_binary(Term)}).
+ notify(Log, {alog, [term_to_binary(Term)]}).
-spec alog_terms(Log, TermList) -> notify_ret() when
Log :: log(),
@@ -167,7 +167,7 @@ alog_terms(Log, Terms) ->
Log :: log(),
Bytes :: iodata().
balog(Log, Bytes) ->
- notify(Log, {balog, ensure_binary(Bytes)}).
+ notify(Log, {balog, [ensure_binary(Bytes)]}).
-spec balog_terms(Log, ByteList) -> notify_ret() when
Log :: log(),
@@ -1093,12 +1093,9 @@ log_end_sync(S, Sync) ->
state_err(S, Res).
%% Inlined.
-rflat([B]=L) when is_binary(B) -> L;
rflat([B]) -> B;
rflat(B) -> rflat(B, []).
-rflat([B | Bs], L) when is_binary(B) ->
- rflat(Bs, [B | L]);
rflat([B | Bs], L) ->
rflat(Bs, B ++ L);
rflat([], L) -> L.