[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    ACK: [PATCH 23/27] hotkey: rename list 'hotkeys' to avoid name shadowing
From:       ivanhu <ivan.hu () canonical ! com>
Date:       2018-08-16 9:20:00
Message-ID: 61368280-3918-7bc0-03ee-f01c952bca23 () canonical ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]

[Attachment #6 (multipart/alternative)]


On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king@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@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@canonical.com>

[Attachment #9 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 08/15/2018 09:11 PM, Colin King
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20180815131129.24146-24-colin.king@canonical.com">
      <pre wrap="">From: Colin Ian King <a class="moz-txt-link-rfc2396E" \
href="mailto:colin.king@canonical.com">&lt;colin.king@canonical.com&gt;</a>

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 <a class="moz-txt-link-rfc2396E" \
                href="mailto:colin.king@canonical.com">&lt;colin.king@canonical.com&gt;</a>
                
---
 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);
 
</pre>
    </blockquote>
    <br>
    Acked-by: Ivan Hu <a class="moz-txt-link-rfc2396E"
      href="mailto:ivan.hu@canonical.com">&lt;ivan.hu@canonical.com&gt;</a>
  </body>
</html>


["signature.asc" (application/pgp-signature)]
[Attachment #11 (text/plain)]

-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic