nickva commented on code in PR #5373:
URL: https://github.com/apache/couchdb/pull/5373#discussion_r1901408261


##########
src/couch/src/couch_file.erl:
##########
@@ -535,13 +512,13 @@ handle_call({pread_iolists, PosL}, _From, File) ->
     ),
     Resps = read_multi_raw_iolists_int(File, LocNums2),
     Extracted = lists:zipwith(
-        fun({LenIoList, _}, {IoList, _}) ->
+        fun({LenIoList, _}, {FullIoList, _}) ->
             case iolist_to_binary(LenIoList) of
                 <<1:1/integer, _:31/integer>> ->
-                    {Checksum, IoList} = extract_checksum(IoList),
+                    {Checksum, IoList} = extract_checksum(FullIoList),

Review Comment:
   Even better swapping `IoList` and `Checksum` lets us skip the extra line in 
`case` cause as we can directly return `extract_checksum(FullIoList)` result.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to