[PATCH v3] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-17 Thread GwanYeong Kim
This isn't really accurate right. fread() doesn't always return 0 in error. It could return < number of elements and set errno. Signed-off-by: GwanYeong Kim --- tools/usb/usbip/libsrc/usbip_device_driver.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/to

Re: [PATCH v2] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-16 Thread GwanYeong Kim
On Wed, 16 Oct 2019 20:33:39 -0600 shuah wrote: > On 10/16/19 8:25 PM, GwanYeong Kim wrote: > > cannot be less than 0 - fread() returns 0 on error. > > > > This isn't really accurate right. fread() doesn't always > return 0 in error. It could return &l

[PATCH v2] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-16 Thread GwanYeong Kim
cannot be less than 0 - fread() returns 0 on error. Signed-off-by: GwanYeong Kim --- tools/usb/usbip/libsrc/usbip_device_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/usb/usbip/libsrc/usbip_device_driver.c b/tools/usb/usbip/libsrc/usbip_device_driver.c

Re: [PATCH] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-15 Thread GwanYeong Kim
On Tue, 15 Oct 2019 17:14:32 -0600 shuah wrote: > On 10/15/19 7:14 AM, GwanYeong Kim wrote: > > cannot be less than 0 - fread() returns 0 on error. > > > > Signed-off-by: GwanYeong Kim > > --- > > tools/usb/usbip/libsrc/usbip_device_driver.c | 2 +- > &

[PATCH] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-15 Thread GwanYeong Kim
cannot be less than 0 - fread() returns 0 on error. Signed-off-by: GwanYeong Kim --- tools/usb/usbip/libsrc/usbip_device_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/usb/usbip/libsrc/usbip_device_driver.c b/tools/usb/usbip/libsrc/usbip_device_driver.c