summaryrefslogtreecommitdiff
path: root/libgphoto2_port/serial
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2014-04-11 20:10:32 +0000
committerMarcus Meissner <marcus@jet.franken.de>2014-04-11 20:10:32 +0000
commitc1ddde0315005e55ef361720b8b758fa163b1731 (patch)
treeef0d7fdd0ebcc010cd1c50e697eb01ddb86f2421 /libgphoto2_port/serial
parent9e777504d448e26ace9a56f509a13a1f8fbbcf55 (diff)
downloadlibgphoto2-c1ddde0315005e55ef361720b8b758fa163b1731.tar.gz
From: "Daniel P. Berrange" <berrange@redhat.com>
A great many functions have variables which are set to some value, but never read thereafter. All these variables can be removed with no functional impact. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14896 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/serial')
-rw-r--r--libgphoto2_port/serial/unix.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c
index 03856fc4a..35c3b46dc 100644
--- a/libgphoto2_port/serial/unix.c
+++ b/libgphoto2_port/serial/unix.c
@@ -300,7 +300,7 @@ gp_port_library_list (GPPortInfoList *list)
{
GPPortInfo info;
char path[1024], prefix[1024];
- int x, fd;
+ int x;
struct stat s;
#ifdef OS2
int r, fh, option;
@@ -334,25 +334,6 @@ gp_port_library_list (GPPortInfoList *list)
if ((stat (path, &s) == -1) && ((errno == ENOENT) || (errno == ENODEV)))
continue;
-#if 0
- /* First of all, try to lock the device */
- if (gp_port_serial_lock (NULL, path) < 0)
- continue;
-
- /* Device locked. Try to open the device. */
- fd = open (path, O_RDONLY | O_NONBLOCK);
- if (fd < 0) {
- gp_port_serial_unlock (NULL, path);
- continue;
- }
-
- /*
- * Device locked and opened. Close it, unlock it, and add
- * it to the list.
- */
- close (fd);
- gp_port_serial_unlock (NULL, path);
-#endif
gp_port_info_new (&info);
gp_port_info_set_type (info, GP_PORT_SERIAL);
xname = malloc (strlen("serial:")+strlen(path)+1);