diff mbox series

[v1,31/59] util/aio-posix.c: remove unneeded 'out' label in aio_epoll

Message ID 20200106182425.20312-32-danielhb413@gmail.com (mailing list archive)
State New, archived
Headers show
Series trivial unneeded labels cleanup | expand

Commit Message

Daniel Henrique Barboza Jan. 6, 2020, 6:23 p.m. UTC
'out' can be replaced by 'return ret'.

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 util/aio-posix.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Thomas Huth Jan. 7, 2020, 1:34 p.m. UTC | #1
On 06/01/2020 19.23, Daniel Henrique Barboza wrote:
> 'out' can be replaced by 'return ret'.
> 
> CC: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
>  util/aio-posix.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/util/aio-posix.c b/util/aio-posix.c
> index a4977f538e..7c4cfea8ce 100644
> --- a/util/aio-posix.c
> +++ b/util/aio-posix.c
> @@ -121,7 +121,7 @@ static int aio_epoll(AioContext *ctx, GPollFD *pfds,
>                           ARRAY_SIZE(events),
>                           timeout);
>          if (ret <= 0) {
> -            goto out;
> +            return ret;
>          }
>          for (i = 0; i < ret; i++) {
>              int ev = events[i].events;
> @@ -132,7 +132,6 @@ static int aio_epoll(AioContext *ctx, GPollFD *pfds,
>                  (ev & EPOLLERR ? G_IO_ERR : 0);
>          }
>      }
> -out:
>      return ret;
>  }

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/util/aio-posix.c b/util/aio-posix.c
index a4977f538e..7c4cfea8ce 100644
--- a/util/aio-posix.c
+++ b/util/aio-posix.c
@@ -121,7 +121,7 @@  static int aio_epoll(AioContext *ctx, GPollFD *pfds,
                          ARRAY_SIZE(events),
                          timeout);
         if (ret <= 0) {
-            goto out;
+            return ret;
         }
         for (i = 0; i < ret; i++) {
             int ev = events[i].events;
@@ -132,7 +132,6 @@  static int aio_epoll(AioContext *ctx, GPollFD *pfds,
                 (ev & EPOLLERR ? G_IO_ERR : 0);
         }
     }
-out:
     return ret;
 }