diff --git a/src/function/uvc.c b/src/function/uvc.c index 5c19842..cad4971 100644 --- a/src/function/uvc.c +++ b/src/function/uvc.c @@ -174,8 +174,8 @@ int init_frames(struct usbg_f_uvc *uvc, int j) return ret; } - nmb = scandir(fpath, &dent, frame_select, frame_sort); - if (nmb < 0) { + ret = scandir(fpath, &dent, frame_select, frame_sort); + if (ret < 0) { ret = usbg_translate_error(errno); return ret; }