Re: [PATCH] lib: Drop '&*' from '&*variable'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 31, 2022 at 3:12 PM Michal Privoznik <mprivozn@xxxxxxxxxx> wrote:
>
> Apparently, some of '&*variable' slipped in. Drop '&*' and access
> the variable directly.
>
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Reviewed-by: Ani Sinha <ani@xxxxxxxxxxx>

> ---
>  src/qemu/qemu_domain.c           | 2 +-
>  src/qemu/qemu_driver.c           | 2 +-
>  src/qemu/qemu_migration_cookie.c | 2 +-
>  src/rpc/virnetclientstream.c     | 8 ++++----
>  4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index aa8f6b8d05..6b915d7535 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -1765,7 +1765,7 @@ qemuStorageSourcePrivateDataAssignSecinfo(qemuDomainSecretInfo **secinfo,
>          *secinfo = g_new0(qemuDomainSecretInfo, 1);
>      }
>
> -    (*secinfo)->alias = g_steal_pointer(&*alias);
> +    (*secinfo)->alias = g_steal_pointer(alias);
>
>      return 0;
>  }
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 1141efef4b..370d223198 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -12221,7 +12221,7 @@ qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
>
>      virCPUDefFreeModel(dst);
>
> -    info = g_steal_pointer(&*src);
> +    info = g_steal_pointer(src);
>      dst->model = g_steal_pointer(&info->name);
>
>      for (i = 0; i < info->nprops; i++) {
> diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
> index bffab7c13d..ba05a5a07f 100644
> --- a/src/qemu/qemu_migration_cookie.c
> +++ b/src/qemu/qemu_migration_cookie.c
> @@ -423,7 +423,7 @@ qemuMigrationCookieAddPersistent(qemuMigrationCookie *mig,
>      if (!def || !*def)
>          return 0;
>
> -    mig->persistent = g_steal_pointer(&*def);
> +    mig->persistent = g_steal_pointer(def);
>      mig->flags |= QEMU_MIGRATION_COOKIE_PERSISTENT;
>      mig->flagsMandatory |= QEMU_MIGRATION_COOKIE_PERSISTENT;
>      return 0;
> diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c
> index eb4dc6854d..e8e8ca2af2 100644
> --- a/src/rpc/virnetclientstream.c
> +++ b/src/rpc/virnetclientstream.c
> @@ -286,18 +286,18 @@ int virNetClientStreamSetError(virNetClientStream *st,
>          st->err.code = err.code;
>      }
>      if (err.message) {
> -        st->err.message = g_steal_pointer(&*err.message);
> +        st->err.message = g_steal_pointer(err.message);
>      }
>      st->err.domain = err.domain;
>      st->err.level = err.level;
>      if (err.str1) {
> -        st->err.str1 = g_steal_pointer(&*err.str1);
> +        st->err.str1 = g_steal_pointer(err.str1);
>      }
>      if (err.str2) {
> -        st->err.str2 = g_steal_pointer(&*err.str2);
> +        st->err.str2 = g_steal_pointer(err.str2);
>      }
>      if (err.str3) {
> -        st->err.str3 = g_steal_pointer(&*err.str3);
> +        st->err.str3 = g_steal_pointer(err.str3);
>      }
>      st->err.int1 = err.int1;
>      st->err.int2 = err.int2;
> --
> 2.34.1
>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux