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
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_floppy.cc')
-rw-r--r--winsup/cygwin/fhandler_floppy.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc
index 5ebcd14cd..a5adcae6e 100644
--- a/winsup/cygwin/fhandler_floppy.cc
+++ b/winsup/cygwin/fhandler_floppy.cc
@@ -41,6 +41,7 @@ fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo)
char dbuf[256];
char pbuf[256];
+ DISK_GEOMETRY_EX *dix = NULL;
DISK_GEOMETRY *di = NULL;
PARTITION_INFORMATION_EX *pix = NULL;
PARTITION_INFORMATION *pi = NULL;
@@ -57,7 +58,8 @@ fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo)
__seterrno ();
else
{
- di = &((DISK_GEOMETRY_EX *) dbuf)->Geometry;
+ dix = (DISK_GEOMETRY_EX *) dbuf;
+ di = &dix->Geometry;
if (!DeviceIoControl (get_handle (),
IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0,
pbuf, 256, &bytes_read, NULL))