summaryrefslogtreecommitdiff
path: root/libgphoto2_port/serial
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@beiboot.suse.de>2016-02-07 20:55:54 +0100
committerMarcus Meissner <marcus@beiboot.suse.de>2016-02-07 20:55:54 +0100
commit1f95b3dce412cc4d696220cea1be8d8d1feba6a7 (patch)
tree470cb717775fc597013766fbbfd10a367a1f419d /libgphoto2_port/serial
parent96535e95a1d8ecbdbec90619b5402ad65886b417 (diff)
downloadlibgphoto2-1f95b3dce412cc4d696220cea1be8d8d1feba6a7.tar.gz
do not check the return of the gp_port_info_list_append in generic
case, as it might be -1
Diffstat (limited to 'libgphoto2_port/serial')
-rw-r--r--libgphoto2_port/serial/unix.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c
index 30df35747..0b6876e0a 100644
--- a/libgphoto2_port/serial/unix.c
+++ b/libgphoto2_port/serial/unix.c
@@ -348,9 +348,16 @@ gp_port_library_list (GPPortInfoList *list)
*/
gp_port_info_new (&info);
gp_port_info_set_type (info, GP_PORT_SERIAL);
+ gp_port_info_set_path (info, "serial:");
+ gp_port_info_set_name (info, _("Serial Port Device"));
+ CHECK (gp_port_info_list_append (list, info));
+
+ gp_port_info_new (&info);
+ gp_port_info_set_type (info, GP_PORT_SERIAL);
gp_port_info_set_path (info, "^serial:");
gp_port_info_set_name (info, "");
- return gp_port_info_list_append (list, info);
+ gp_port_info_list_append (list, info); /* do not check */
+ return GP_OK;
}
static int