diff mbox series

[1/3] 9pfs: Convert V9fsFidState::clunked to bool

Message ID 20210118142300.801516-2-groug@kaod.org
State New
Headers show
Series 9pfs: Improve unreclaim logic | expand

Commit Message

Greg Kurz Jan. 18, 2021, 2:22 p.m. UTC
This can only be 0 or 1.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/9pfs/9p.c | 4 ++--
 hw/9pfs/9p.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Christian Schoenebeck Jan. 18, 2021, 2:42 p.m. UTC | #1
On Montag, 18. Januar 2021 15:22:58 CET Greg Kurz wrote:
> This can only be 0 or 1.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>

I still need to go through the other 2 patches. I should be done tomorrow.

> ---
>  hw/9pfs/9p.c | 4 ++--
>  hw/9pfs/9p.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
> index 6026b51a1c04..37c3379b7462 100644
> --- a/hw/9pfs/9p.c
> +++ b/hw/9pfs/9p.c
> @@ -413,7 +413,7 @@ static V9fsFidState *clunk_fid(V9fsState *s, int32_t
> fid) }
>      fidp = *fidpp;
>      *fidpp = fidp->next;
> -    fidp->clunked = 1;
> +    fidp->clunked = true;
>      return fidp;
>  }
> 
> @@ -544,7 +544,7 @@ static void coroutine_fn virtfs_reset(V9fsPDU *pdu)
> 
>          /* Clunk fid */
>          s->fid_list = fidp->next;
> -        fidp->clunked = 1;
> +        fidp->clunked = true;
> 
>          put_fid(pdu, fidp);
>      }
> diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
> index 32df81f360ea..93656323d1d7 100644
> --- a/hw/9pfs/9p.h
> +++ b/hw/9pfs/9p.h
> @@ -279,7 +279,7 @@ struct V9fsFidState {
>      int open_flags;
>      uid_t uid;
>      int ref;
> -    int clunked;
> +    bool clunked;
>      V9fsFidState *next;
>      V9fsFidState *rclm_lst;
>  };
diff mbox series

Patch

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 6026b51a1c04..37c3379b7462 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -413,7 +413,7 @@  static V9fsFidState *clunk_fid(V9fsState *s, int32_t fid)
     }
     fidp = *fidpp;
     *fidpp = fidp->next;
-    fidp->clunked = 1;
+    fidp->clunked = true;
     return fidp;
 }
 
@@ -544,7 +544,7 @@  static void coroutine_fn virtfs_reset(V9fsPDU *pdu)
 
         /* Clunk fid */
         s->fid_list = fidp->next;
-        fidp->clunked = 1;
+        fidp->clunked = true;
 
         put_fid(pdu, fidp);
     }
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
index 32df81f360ea..93656323d1d7 100644
--- a/hw/9pfs/9p.h
+++ b/hw/9pfs/9p.h
@@ -279,7 +279,7 @@  struct V9fsFidState {
     int open_flags;
     uid_t uid;
     int ref;
-    int clunked;
+    bool clunked;
     V9fsFidState *next;
     V9fsFidState *rclm_lst;
 };