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
path: root/winsup
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 12:28:01 +0300
commit2654a5ba76de97f5211aa033fb1c7223a127e1b9 (patch)
treefa8f5e8e326d89d17326063fa586a6ba7d767fc7 /winsup
parent2ab2e73c2c9602de98e218525d30149f0fb109ee (diff)
Cygwin: dps: Fix a bug that read() could not return -1 on error.
Diffstat (limited to 'winsup')
-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 8e51a51c5..e872aa08c 100644
--- a/winsup/cygwin/fhandler/dsp.cc
+++ b/winsup/cygwin/fhandler/dsp.cc
@@ -1192,7 +1192,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