dlls/dinput/effect_linuxinput.c: Check return value of 'write'. (bug # 16413)

titon barua titanix88 at gmail.com
Sun Jan 4 14:11:44 CST 2009


---
 dlls/dinput/effect_linuxinput.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c
index 3395a37..414a7cd 100644
--- a/dlls/dinput/effect_linuxinput.c
+++ b/dlls/dinput/effect_linuxinput.c
@@ -734,7 +734,8 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
     event.code = This->effect.id;
     event.value = 0;
     /* we don't care about the success or failure of this call */
-    write(*(This->fd), &event, sizeof(event));
+    /* print errors if they occur */
+    if (write(*(This->fd), &event, sizeof(event)) == -1) perror ( NULL );
 
     return DI_OK;
 }
-- 
1.5.6.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20090105/b804843d/attachment.htm 


More information about the wine-patches mailing list