public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_4-branch] Cygwin: dps: Fix a bug that read() could not return -1 on error.
@ 2023-09-05 9:31 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2023-09-05 9:31 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b48a497cf0c575900f7a56c55752c8b4cecc6914
commit b48a497cf0c575900f7a56c55752c8b4cecc6914
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Tue Sep 5 16:59:51 2023 +0900
Cygwin: dps: Fix a bug that read() could not return -1 on error.
Diff:
---
winsup/cygwin/fhandler/dsp.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler/dsp.cc b/winsup/cygwin/fhandler/dsp.cc
index d930328ce..dbe27905a 100644
--- a/winsup/cygwin/fhandler/dsp.cc
+++ b/winsup/cygwin/fhandler/dsp.cc
@@ -1188,7 +1188,9 @@ fhandler_dev_dsp::_read (void *ptr, size_t& len)
return;
}
- audio_in_->read ((char *)ptr, (int&)len);
+ int res = len;
+ audio_in_->read ((char *)ptr, res);
+ len = (size_t)res;
}
void
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-05 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05 9:31 [newlib-cygwin/cygwin-3_4-branch] Cygwin: dps: Fix a bug that read() could not return -1 on error Takashi Yano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).