summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-06-22 16:02:00 +0200
committerBen Gamari <ben@smart-cactus.org>2020-07-15 16:41:03 -0400
commitd679b544e14ad912fddc97b1b735d3c2838a2c4b (patch)
tree7fa1b9a25a8c3559f45558af7d57260e716ae0a7
parentaa0a4bbfbae0244313fa99862b97f71c15f9bd81 (diff)
downloadhaskell-d679b544e14ad912fddc97b1b735d3c2838a2c4b.tar.gz
winio: Remove redundant buffer write in Handle/Text.hs:bufReadEmpty
-rw-r--r--libraries/base/GHC/IO/Handle/Text.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/libraries/base/GHC/IO/Handle/Text.hs b/libraries/base/GHC/IO/Handle/Text.hs
index f38b84f601..6d63bb0d54 100644
--- a/libraries/base/GHC/IO/Handle/Text.hs
+++ b/libraries/base/GHC/IO/Handle/Text.hs
@@ -983,8 +983,7 @@ bufReadEmpty h_@Handle__{..}
writeIORef haByteBuffer buf'
if r == 0 -- end of file reached
then return so_far
- else do writeIORef haByteBuffer buf'
- bufReadNonEmpty h_ buf' ptr so_far count
+ else bufReadNonEmpty h_ buf' ptr so_far count
where
-- Read @bytes@ byte into ptr. Repeating the read until either zero
-- bytes where read, or we are done reading.