Discussion:
[libdvdcss-devel] [PATCH] ioctl: Simplify win32 version of ioctl_ReportAgid()
Diego Biurrun
2014-11-18 22:47:58 UTC
Permalink
---
src/ioctl.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/ioctl.c b/src/ioctl.c
index 6e078d6..fe5e08e 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -553,13 +553,10 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*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__ )
--
2.1.0
Jean-Baptiste Kempf
2014-11-18 22:56:29 UTC
Permalink
ok.
Post by Diego Biurrun
---
src/ioctl.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/ioctl.c b/src/ioctl.c
index 6e078d6..fe5e08e 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -553,13 +553,10 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*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__ )
--
2.1.0
_______________________________________________
libdvdcss-devel mailing list
https://mailman.videolan.org/listinfo/libdvdcss-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Diego Biurrun
2014-11-18 23:11:37 UTC
Permalink
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Tue Nov 18 18:29:36 2014 +0100| [1c2da8e3818b07036ea5931ab7e6e6033e50e1da] | committer: Diego Biurrun

ioctl: Simplify win32 version of ioctl_ReportAgid()
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=1c2da8e3818b07036ea5931ab7e6e6033e50e1da
---

src/ioctl.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/ioctl.c b/src/ioctl.c
index 6e078d6..fe5e08e 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -553,13 +553,10 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*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__ )

Loading...