projects
/
libam7xxx.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
am7xxx: make a comment clearer about SCAN_OP_OPEN_DEVICE
[libam7xxx.git]
/
src
/
am7xxx.c
diff --git
a/src/am7xxx.c
b/src/am7xxx.c
index
ffdd59c
..
f874469
100644
(file)
--- a/
src/am7xxx.c
+++ b/
src/am7xxx.c
@@
-1,6
+1,6
@@
/* am7xxx - communication with AM7xxx based USB Pico Projectors and DPFs
*
/* am7xxx - communication with AM7xxx based USB Pico Projectors and DPFs
*
- * Copyright (C) 2012
Antonio Ospite <ospite@studenti.unina
.it>
+ * Copyright (C) 2012
-2014 Antonio Ospite <ao2@ao2
.it>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-832,7
+832,8
@@
out_libusb_close:
}
}
}
}
- /* if we made it up to here we didn't find any device to open */
+ /* if we made it up to here when op == SCAN_OP_OPEN_DEVICE,
+ * no devices to open had been found. */
if (op == SCAN_OP_OPEN_DEVICE) {
error(ctx, "Cannot find any device to open\n");
ret = -ENODEV;
if (op == SCAN_OP_OPEN_DEVICE) {
error(ctx, "Cannot find any device to open\n");
ret = -ENODEV;
@@
-1128,7
+1129,7
@@
AM7XXX_PUBLIC int am7xxx_get_device_info(am7xxx_device *dev,
am7xxx_device_info *device_info)
{
int ret;
am7xxx_device_info *device_info)
{
int ret;
- struct am7xxx_header h
= { 0 }
;
+ struct am7xxx_header h;
if (dev->device_info) {
memcpy(device_info, dev->device_info, sizeof(*device_info));
if (dev->device_info) {
memcpy(device_info, dev->device_info, sizeof(*device_info));
@@
-1139,6
+1140,7
@@
AM7XXX_PUBLIC int am7xxx_get_device_info(am7xxx_device *dev,
if (ret < 0)
return ret;
if (ret < 0)
return ret;
+ memset(&h, 0, sizeof(h));
ret = read_header(dev, &h);
if (ret < 0)
return ret;
ret = read_header(dev, &h);
if (ret < 0)
return ret;