[PATCH 1/2] util/compatfd.c: Fixed style issues

Mahmoud Mandour posted 2 patches 4 years, 11 months ago
[PATCH 1/2] util/compatfd.c: Fixed style issues
Posted by Mahmoud Mandour 4 years, 11 months ago
Fixed two styling issues that caused checkpatch.pl errors.

Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>
---
 util/compatfd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/util/compatfd.c b/util/compatfd.c
index ee47dd8089..174f394533 100644
--- a/util/compatfd.c
+++ b/util/compatfd.c
@@ -20,8 +20,7 @@
 #include <sys/syscall.h>
 #endif
 
-struct sigfd_compat_info
-{
+struct sigfd_compat_info {
     sigset_t mask;
     int fd;
 };
@@ -53,8 +52,9 @@ static void *sigwait_compat(void *opaque)
 
                 len = write(info->fd, (char *)&buffer + offset,
                             sizeof(buffer) - offset);
-                if (len == -1 && errno == EINTR)
+                if (len == -1 && errno == EINTR) {
                     continue;
+                }
 
                 if (len <= 0) {
                     return NULL;
-- 
2.25.1


Re: [PATCH 1/2] util/compatfd.c: Fixed style issues
Posted by Thomas Huth 4 years, 11 months ago
On 15/03/2021 11.58, Mahmoud Mandour wrote:
> Fixed two styling issues that caused checkpatch.pl errors.
> 
> Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>
> ---
>   util/compatfd.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/util/compatfd.c b/util/compatfd.c
> index ee47dd8089..174f394533 100644
> --- a/util/compatfd.c
> +++ b/util/compatfd.c
> @@ -20,8 +20,7 @@
>   #include <sys/syscall.h>
>   #endif
>   
> -struct sigfd_compat_info
> -{
> +struct sigfd_compat_info {
>       sigset_t mask;
>       int fd;
>   };
> @@ -53,8 +52,9 @@ static void *sigwait_compat(void *opaque)
>   
>                   len = write(info->fd, (char *)&buffer + offset,
>                               sizeof(buffer) - offset);
> -                if (len == -1 && errno == EINTR)
> +                if (len == -1 && errno == EINTR) {
>                       continue;
> +                }
>   
>                   if (len <= 0) {
>                       return NULL;
> 

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