shithub: libdvdcss

Download patch

ref: 1c2da8e3818b07036ea5931ab7e6e6033e50e1da
parent: bb6e3da30118fd64df791a60f25ac54cf7937b25
author: Diego Biurrun <diego@biurrun.de>
date: Tue Nov 18 13:29:36 EST 2014

ioctl: Simplify win32 version of ioctl_ReportAgid()

--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -553,13 +553,10 @@
     *pi_agid = dvdbs.grantID;
 
 #elif defined( WIN32 )
-    ULONG id;
     DWORD tmp = 0;
 
-    i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_START_SESSION,
-                    &tmp, 4, &id, sizeof( id ), &tmp, NULL ) ? 0 : -1;
-
-    *pi_agid = id;
+    i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_START_SESSION, &tmp, 4,
+                             pi_agid, sizeof( *pi_agid ), &tmp, NULL ) ? 0 : -1;
 
 #elif defined( __QNXNTO__ )