[U-Boot] [PATCH] removed '!' in for loop stop condition
Marek Vasut
marex at denx.de
Tue Aug 27 13:08:36 UTC 2019
On 8/27/19 3:02 PM, Niv Shetrit wrote:
> Signed-off-by: Niv Shetrit <niv.shetrit at altair-semi.com>
> ---
> drivers/usb/gadget/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
> index ffaf161fb7..ae7387ee0a 100644
> --- a/drivers/usb/gadget/core.c
> +++ b/drivers/usb/gadget/core.c
> @@ -307,7 +307,7 @@ struct usb_endpoint_descriptor *usbd_device_endpoint_descriptor (struct usb_devi
> struct usb_endpoint_descriptor *endpoint_descriptor;
> int i;
>
> - for (i = 0; !(endpoint_descriptor = usbd_device_endpoint_descriptor_index (device, port, configuration, interface, alternate, i)); i++) {
> + for (i = 0; endpoint_descriptor = usbd_device_endpoint_descriptor_index (device, port, configuration, interface, alternate, i); i++) {
> if (endpoint_descriptor->bEndpointAddress == endpoint) {
> return endpoint_descriptor;
> }
>
This changes the behavior of the code. Why is this needed ? The patch
needs detailed explanation of and rationale behind the change.
More information about the U-Boot
mailing list