[PATCH] bsps/shared/grlib/1553/b1553brm.c : addressed logic issue and unsigned_compare

suyash singh suyashsingh234 at gmail.com
Fri Feb 28 17:17:17 UTC 2020


count is unsigned int and will always be >=0.

On Fri, Feb 28, 2020 at 10:42 PM suyash singh <suyashsingh234 at gmail.com>
wrote:

> ---
>  bsps/shared/grlib/1553/b1553brm.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/bsps/shared/grlib/1553/b1553brm.c
> b/bsps/shared/grlib/1553/b1553brm.c
> index 57ef70126b..4041423541 100644
> --- a/bsps/shared/grlib/1553/b1553brm.c
> +++ b/bsps/shared/grlib/1553/b1553brm.c
> @@ -982,10 +982,8 @@ static rtems_device_driver
> brm_write(rtems_device_major_number major, rtems_devi
>
>         rw_args->bytes_moved = count;
>
> -       if (count >= 0) {
> -               return RTEMS_SUCCESSFUL;
> -       }
> -       return RTEMS_UNSATISFIED;
> +       return RTEMS_SUCCESSFUL;
> +
>  }
>
>  static rtems_device_driver brm_control(rtems_device_major_number major,
> rtems_device_minor_number minor, void *arg)
> --
> 2.17.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200228/8230ea5f/attachment.html>


More information about the devel mailing list