Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 651c1d2

Browse files
committed
Update 4-19_handle-binary-files.asciidoc
Calling (count strdata) twice is needless duplication.
1 parent 73808e7 commit 651c1d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

04_local-io/4-19_handle-binary-files.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ using an intermediate `ByteBuffer`:
6262
(defn prepare-string [strdata]
6363
(let [strlen (count strdata)
6464
version 66
65-
buflen (+ 1 4 (count strdata))
65+
buflen (+ 1 4 strlen)
6666
bb (ByteBuffer/allocate buflen)
6767
buf (byte-array buflen)]
6868
(doto bb

0 commit comments

Comments
 (0)