store: Use 'write-bytevector' instead of hand-coded equivalent.

* guix/store.scm (process-stderr): Use 'write-bytevector' in the
%STDERR-READ case.
This commit is contained in:
Ludovic Courtès 2017-05-04 16:41:30 +02:00
parent cd041b268e
commit 396d12faea
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 1 additions and 3 deletions

View File

@ -581,9 +581,7 @@ encoding conversion errors."
(let* ((max-len (read-int p)) (let* ((max-len (read-int p))
(data (make-bytevector max-len)) (data (make-bytevector max-len))
(len (get-bytevector-n! user-port data 0 max-len))) (len (get-bytevector-n! user-port data 0 max-len)))
(write-int len p) (write-bytevector data p)
(put-bytevector p data 0 len)
(write-padding len p)
#f)) #f))
((= k %stderr-next) ((= k %stderr-next)
;; Log a string. Build logs are usually UTF-8-encoded, but they ;; Log a string. Build logs are usually UTF-8-encoded, but they