RE: [PATCH 2/3] tools/hv: Fix string types

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

 




> -----Original Message-----
> From: Tomas Hozza [mailto:thozza@xxxxxxxxxx]
> Sent: Friday, November 09, 2012 9:01 AM
> To: olaf@xxxxxxxxx; KY Srinivasan; gregkh@xxxxxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx; apw@xxxxxxxxxxxxx;
> jasowang@xxxxxxxxxx; ben@xxxxxxxxxxxxxxx
> Cc: Tomas Hozza
> Subject: [PATCH 2/3] tools/hv: Fix string types
> 
> Initial patch by Ben Hutchings <ben@xxxxxxxxxxxxxxx>
> 
> Standard C strings are arrays of char, not __u8 (unsigned char).
> Declare variables and parameters accordingly, and add the necessary
> casts.
> 
> Signed-off-by: Tomas Hozza <thozza@xxxxxxxxxx>
Acked-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> ---
>  tools/hv/hv_kvp_daemon.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> index d9b3a74..573b9aa 100644
> --- a/tools/hv/hv_kvp_daemon.c
> +++ b/tools/hv/hv_kvp_daemon.c
> @@ -300,7 +300,7 @@ static int kvp_file_init(void)
>  	return 0;
>  }
> 
> -static int kvp_key_delete(int pool, __u8 *key, int key_size)
> +static int kvp_key_delete(int pool, const char *key, int key_size)
>  {
>  	int i;
>  	int j, k;
> @@ -343,7 +343,7 @@ static int kvp_key_delete(int pool, __u8 *key, int
> key_size)
>  	return 1;
>  }
> 
> -static int kvp_key_add_or_modify(int pool, __u8 *key, int key_size, __u8
> *value,
> +static int kvp_key_add_or_modify(int pool, const char *key, int key_size, const
> char *value,
>  			int value_size)
>  {
>  	int i;
> @@ -397,7 +397,7 @@ static int kvp_key_add_or_modify(int pool, __u8 *key, int
> key_size, __u8 *value,
>  	return 0;
>  }
> 
> -static int kvp_get_value(int pool, __u8 *key, int key_size, __u8 *value,
> +static int kvp_get_value(int pool, const char *key, int key_size, char *value,
>  			int value_size)
>  {
>  	int i;
> @@ -429,8 +429,8 @@ static int kvp_get_value(int pool, __u8 *key, int key_size,
> __u8 *value,
>  	return 1;
>  }
> 
> -static int kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size,
> -				__u8 *value, int value_size)
> +static int kvp_pool_enumerate(int pool, int index, char *key, int key_size,
> +				char *value, int value_size)
>  {
>  	struct kvp_record *record;
> 
> --
> 1.7.11.7
> 
> 


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux