diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2013-09-01 11:14:36 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2013-09-01 11:14:36 +0000 |
commit | 56eef2c53a931fdca666ce4d691339394a1293d5 (patch) | |
tree | 64106788c1bce0d4ec55831b456c947a2aaa1481 /examples | |
parent | c448ddb4357e4b2e58e1e3fb56acb9716b7a7789 (diff) | |
download | libgphoto2-56eef2c53a931fdca666ce4d691339394a1293d5.tar.gz |
fixed return code checking logic
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14531 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'examples')
-rw-r--r-- | examples/autodetect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/autodetect.c b/examples/autodetect.c index 7772c12fe..fbf6d6fea 100644 --- a/examples/autodetect.c +++ b/examples/autodetect.c @@ -60,7 +60,6 @@ sample_open_camera (Camera ** camera, const char *model, const char *port, GPCon /* Then associate the camera with the specified port */ p = gp_port_info_list_lookup_path (portinfolist, port); - if (ret < GP_OK) return ret; switch (p) { case GP_ERROR_UNKNOWN_PORT: fprintf (stderr, "The port you specified " @@ -74,7 +73,8 @@ sample_open_camera (Camera ** camera, const char *model, const char *port, GPCon default: break; } - if (ret < GP_OK) return ret; + if (p < GP_OK) return p; + ret = gp_port_info_list_get_info (portinfolist, p, &pi); if (ret < GP_OK) return ret; ret = gp_camera_set_port_info (*camera, pi); |