diff options
author | Bdale Garbee <bdale@gag.com> | 2014-06-15 17:47:41 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2014-06-15 17:47:41 -0600 |
commit | c5cfc0d6e507d093987741b6ffaf69ebb24caa4b (patch) | |
tree | a75b83343939e96592ac07178f2011d82ea6ded8 /libaltos/libaltos.c | |
parent | 1b3d07ede530fa40cb7257fb1725c969ba60e0f0 (diff) | |
parent | 9ab3a1de95b705783c31a7e16447f52c10b6b480 (diff) |
Merge branch 'branch-1.4' into debian
Diffstat (limited to 'libaltos/libaltos.c')
-rw-r--r-- | libaltos/libaltos.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libaltos/libaltos.c b/libaltos/libaltos.c index a623d5ae..b7ec98fc 100644 --- a/libaltos/libaltos.c +++ b/libaltos/libaltos.c @@ -817,7 +817,7 @@ get_string(io_object_t object, CFStringRef entry, char *result, int result_len) got_string = CFStringGetCString(entry_as_string, result, result_len, kCFStringEncodingASCII); - + CFRelease(entry_as_string); if (got_string) return 1; @@ -830,7 +830,7 @@ get_number(io_object_t object, CFStringRef entry, int *result) { CFTypeRef entry_as_number; Boolean got_number; - + entry_as_number = IORegistryEntrySearchCFProperty (object, kIOServicePlane, entry, @@ -885,7 +885,7 @@ altos_list_next(struct altos_list *list, struct altos_device *device) object = IOIteratorNext(list->iterator); if (!object) return 0; - + if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) || !get_number (object, CFSTR(kUSBProductID), &device->product)) continue; @@ -989,7 +989,7 @@ log_message(char *fmt, ...) if (log) { SYSTEMTIME time; GetLocalTime(&time); - fprintf (log, "%4d-%02d-%02d %2d:%02d:%02d. ", + fprintf (log, "%4d-%02d-%02d %2d:%02d:%02d. ", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond); va_start(a, fmt); @@ -1340,7 +1340,7 @@ altos_open(struct altos_device *device) altos_set_last_windows_error(); Sleep(100); } - + if (file->handle == INVALID_HANDLE_VALUE) { free(file); return NULL; |