]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: dps: Fix a bug that read() could not return -1 on error. cygwin-3.4.9
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Tue, 5 Sep 2023 07:59:51 +0000 (16:59 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Tue, 5 Sep 2023 08:09:31 +0000 (17:09 +0900)
winsup/cygwin/fhandler/dsp.cc

index d930328ce0fc45ef01708437d800d9da6dff0d17..dbe27905a9682b6ef17518c1b59d7aae2c5b9ec2 100644 (file)
@@ -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
This page took 0.030577 seconds and 5 git commands to generate.