diff --git a/dongle.c b/dongle.c index 3cca1c730725b4dc1b6aab73c0c806b0eca5e062..233f2366a1d27ca7ae74d62998d3854dfc9a5217 100644 --- a/dongle.c +++ b/dongle.c @@ -441,9 +441,10 @@ int get_devices_from_path(char *input_path) continue; dev = (struct device *)calloc(1, sizeof(*dev)); - if (!dev) { - perror("calloc"); - goto fail_dev; + if (!dev) { //what is correct error handling here? goto inside while? outside while? continue? + /*perror("calloc"); + goto fail_dev;*/ + continue; } dev->usb.product = get_usb_stat(path, "product"); @@ -457,8 +458,6 @@ int get_devices_from_path(char *input_path) } closedir(dir); return 0; -fail_dev: - closedir(dir); fail_dr: return -1; } @@ -525,7 +524,6 @@ char *get_device_ip(char *device_name) if (strncmp(iface, device_name, 10) != 0) continue; - printf("iface %s"); host_flag = atoi(flags) & 4; if (!host_flag) continue;