ACK: [PATCH 23/27] hotkey: rename list 'hotkeys' to avoid name shadowing

ivanhu ivan.hu at canonical.com
Thu Aug 16 09:20:00 UTC 2018



On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Rename the list 'hotkeys' to 'hotkeys_list' to avoid name shadowing
> confusion with various functions that use hotkeys as an argument
> too.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/hotkey/hotkey/hotkey.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
> index 79833d2e..640717cd 100644
> --- a/src/hotkey/hotkey/hotkey.c
> +++ b/src/hotkey/hotkey/hotkey.c
> @@ -30,7 +30,7 @@
>  
>  #define AT_KEYBOARD	"AT Translated Set 2 keyboard"
>  
> -static fwts_list *hotkeys;
> +static fwts_list *hotkeys_list;
>  static char *hotkey_dev;
>  static char *hotkey_keymap;
>  
> @@ -215,7 +215,7 @@ static int hotkey_init(fwts_framework *fw)
>  		fwts_log_error(fw, "Cannot determine keymap for this machine.");
>  		return FWTS_ERROR;
>  	}
> -	if ((hotkeys = fwts_keymap_load(hotkey_keymap)) == NULL) {
> +	if ((hotkeys_list = fwts_keymap_load(hotkey_keymap)) == NULL) {
>  		fwts_log_error(fw, "Cannot load keymap for this machine.");
>  		return FWTS_ERROR;
>  	}
> @@ -227,7 +227,7 @@ static int hotkey_deinit(fwts_framework *fw)
>  {
>  	FWTS_UNUSED(fw);
>  
> -	fwts_keymap_free(hotkeys);
> +	fwts_keymap_free(hotkeys_list);
>  	free(hotkey_dev);
>  	free(hotkey_keymap);
>  	return FWTS_OK;
> @@ -241,7 +241,7 @@ static int hotkey_test1(fwts_framework *fw)
>  		"keys.");
>  	fwts_log_nl(fw);
>  	fwts_log_info(fw, "Using %s keymap and %s input device.", hotkey_keymap, hotkey_dev);
> -	hotkey_test(fw, hotkey_dev, hotkeys);
> +	hotkey_test(fw, hotkey_dev, hotkeys_list);
>  
>  	fwts_infoonly(fw);
>  

Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180816/131d28dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180816/131d28dd/attachment.sig>


More information about the fwts-devel mailing list