Re: [PATCH] Use new SPICE_MAGIC_CONST macro for MAGIC defines

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

 



Hey,

On Mon, Aug 17, 2015 at 11:17:25AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/migration_protocol.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

This is the same of:
http://lists.freedesktop.org/archives/spice-devel/2015-August/021542.html

Looks good for me ;)
  toso

>
> diff --git a/server/migration_protocol.h b/server/migration_protocol.h
> index fa17c7c..4abe27b 100644
> --- a/server/migration_protocol.h
> +++ b/server/migration_protocol.h
> @@ -60,7 +60,7 @@ typedef struct __attribute__ ((__packed__)) SpiceMigrateDataCharDevice {
>  
>  #define SPICE_MIGRATE_DATA_SPICEVMC_VERSION 1 /* NOTE: increase version when CHAR_DEVICE_VERSION
>                                                   is increased */
> -#define SPICE_MIGRATE_DATA_SPICEVMC_MAGIC (*(uint32_t *)"SVMD")
> +#define SPICE_MIGRATE_DATA_SPICEVMC_MAGIC SPICE_MAGIC_CONST("SVMD")
>  typedef struct __attribute__ ((__packed__)) SpiceMigrateDataSpiceVmc {
>      SpiceMigrateDataCharDevice base;
>  } SpiceMigrateDataSpiceVmc;
> @@ -71,7 +71,7 @@ typedef struct __attribute__ ((__packed__)) SpiceMigrateDataSpiceVmc {
>  
>  #define SPICE_MIGRATE_DATA_SMARTCARD_VERSION 1 /* NOTE: increase version when CHAR_DEVICE_VERSION
>                                                    is increased */
> -#define SPICE_MIGRATE_DATA_SMARTCARD_MAGIC (*(uint32_t *)"SCMD")
> +#define SPICE_MIGRATE_DATA_SMARTCARD_MAGIC SPICE_MAGIC_CONST("SCMD")
>  typedef struct __attribute__ ((__packed__)) SpiceMigrateDataSmartcard {
>      SpiceMigrateDataCharDevice base;
>      uint8_t reader_added;
> @@ -84,7 +84,7 @@ typedef struct __attribute__ ((__packed__)) SpiceMigrateDataSmartcard {
>   * *********************************/
>  #define SPICE_MIGRATE_DATA_MAIN_VERSION 1 /* NOTE: increase version when CHAR_DEVICE_VERSION
>                                               is increased */
> -#define SPICE_MIGRATE_DATA_MAIN_MAGIC (*(uint32_t *)"MNMD")
> +#define SPICE_MIGRATE_DATA_MAIN_MAGIC SPICE_MAGIC_CONST("MNMD")
>  
>  typedef struct __attribute__ ((__packed__)) SpiceMigrateDataMain {
>      SpiceMigrateDataCharDevice agent_base;
> @@ -115,7 +115,7 @@ typedef struct __attribute__ ((__packed__)) SpiceMigrateDataMain {
>   * ***************/
>  
>  #define SPICE_MIGRATE_DATA_DISPLAY_VERSION 1
> -#define SPICE_MIGRATE_DATA_DISPLAY_MAGIC (*(uint32_t *)"DCMD")
> +#define SPICE_MIGRATE_DATA_DISPLAY_MAGIC SPICE_MAGIC_CONST("DCMD")
>  
>  /*
>   * TODO: store the cache and dictionary data only in one channel (the
> @@ -187,7 +187,7 @@ typedef struct __attribute__ ((__packed__)) MigrateDisplaySurfacesAtClientLossy
>   * ***************/
>  
>  #define SPICE_MIGRATE_DATA_INPUTS_VERSION 1
> -#define SPICE_MIGRATE_DATA_INPUTS_MAGIC (*(uint32_t *)"ICMD")
> +#define SPICE_MIGRATE_DATA_INPUTS_MAGIC SPICE_MAGIC_CONST("ICMD")
>  
>  
>  typedef struct __attribute__ ((__packed__)) SpiceMigrateDataInputs {
> -- 
> 2.4.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]