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

2019-10-17 Thread shuah
On 10/16/19 11:26 PM, GwanYeong Kim wrote: 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 < number of e

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 < number of elements > and set errno. > > Pl

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

2019-10-16 Thread shuah
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 < number of elements and set errno. Please make changes to reflect that. Signed-off-by: GwanYeong Kim --

[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 i