X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fjtag%2Fgw16012.c;h=46635d073fb9330a6eaea80e2dc6a0f5c096f65d;hb=9a9ebfb924553e0f4837c4ef77b900f1f5d824f1;hp=51958db41913f50d246c3f2d28a2bb7afb5642ed;hpb=84df52f9ea78e2d71bde648a16b69d80404c6421;p=openocd diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c index 51958db4..46635d07 100644 --- a/src/jtag/gw16012.c +++ b/src/jtag/gw16012.c @@ -422,20 +422,20 @@ static int gw16012_get_giveio_access(void) OSVERSIONINFO version; version.dwOSVersionInfoSize = sizeof version; - if (!GetVersionEx( &version )) { + if (!GetVersionEx(&version)) { errno = EINVAL; return -1; } if (version.dwPlatformId != VER_PLATFORM_WIN32_NT) return 0; - h = CreateFile( "\\\\.\\giveio", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); + h = CreateFile("\\\\.\\giveio", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) { errno = ENODEV; return -1; } - CloseHandle( h ); + CloseHandle(h); return 0; } @@ -500,7 +500,7 @@ static int gw16012_init_device(void) LOG_DEBUG("opening %s...", buffer); device_handle = open(buffer, O_WRONLY); - if (device_handle<0) + if (device_handle < 0) { LOG_ERROR("cannot open device. check it exists and that user read and write rights are set"); return ERROR_JTAG_INIT_FAILED; @@ -524,7 +524,7 @@ static int gw16012_init_device(void) LOG_WARNING("No gw16012 port specified, using default '0x378' (LPT1)"); } - LOG_DEBUG("requesting privileges for parallel port 0x%lx...", (long unsigned)(gw16012_port) ); + LOG_DEBUG("requesting privileges for parallel port 0x%lx...", (long unsigned)(gw16012_port)); #if PARPORT_USE_GIVEIO == 1 if (gw16012_get_giveio_access() != 0) #else /* PARPORT_USE_GIVEIO */