Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2023-09-05 10:59:51 +0300
committerTakashi Yano <takashi.yano@nifty.ne.jp>2023-09-05 11:09:31 +0300
commitb48a497cf0c575900f7a56c55752c8b4cecc6914 (patch)
tree4492b1d4e93184c4f3071e132772c306c8e9e228
parent567f3aae68ef1e8bc3f5cdfddcf5467c7d990686 (diff)
Cygwin: dps: Fix a bug that read() could not return -1 on error.cygwin-3.4.9
-rw-r--r--winsup/cygwin/fhandler/dsp.cc4
1 files changed, 3 insertions, 1 deletions
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