All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] network: use L_AUTO_FREE_VAR
@ 2021-05-14 16:36 Marc-Antoine Perennou
  2021-05-17 15:45 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Marc-Antoine Perennou @ 2021-05-14 16:36 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/network.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/network.c b/src/network.c
index 9e858663..0eb3687e 100644
--- a/src/network.c
+++ b/src/network.c
@@ -380,10 +380,10 @@ static int network_load_psk(struct network *network, bool need_passphrase)
 	size_t psk_len;
 	uint8_t *psk = l_settings_get_bytes(network->settings, "Security",
 						"PreSharedKey", &psk_len);
-	_auto_(l_free) char *passphrase =
+	L_AUTO_FREE_VAR(char *, passphrase) =
 			l_settings_get_string(network->settings,
 						"Security", "Passphrase");
-	_auto_(l_free) char *path =
+	L_AUTO_FREE_VAR(char *, path) =
 		storage_get_network_file_path(security, ssid);
 	int r;
 
-- 
2.30.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] network: use L_AUTO_FREE_VAR
  2021-05-14 16:36 [PATCH] network: use L_AUTO_FREE_VAR Marc-Antoine Perennou
@ 2021-05-17 15:45 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-05-17 15:45 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]

Hi Marc-Antoine,

On 5/14/21 11:36 AM, Marc-Antoine Perennou wrote:
> Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
> ---
>   src/network.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/network.c b/src/network.c
> index 9e858663..0eb3687e 100644
> --- a/src/network.c
> +++ b/src/network.c
> @@ -380,10 +380,10 @@ static int network_load_psk(struct network *network, bool need_passphrase)
>   	size_t psk_len;
>   	uint8_t *psk = l_settings_get_bytes(network->settings, "Security",
>   						"PreSharedKey", &psk_len);
> -	_auto_(l_free) char *passphrase =
> +	L_AUTO_FREE_VAR(char *, passphrase) =
>   			l_settings_get_string(network->settings,
>   						"Security", "Passphrase");
> -	_auto_(l_free) char *path =
> +	L_AUTO_FREE_VAR(char *, path) =
>   		storage_get_network_file_path(security, ssid);
>   	int r;
>   
> 

Was this supposed to be part of a different set?  Can you resend the entire 
series, it isn't quite clear to me where you're going with this?

I would guess your intent is to use _auto_ with destructors only and fall back 
to L_AUTO_FREE_VAR for l_free?

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-17 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 16:36 [PATCH] network: use L_AUTO_FREE_VAR Marc-Antoine Perennou
2021-05-17 15:45 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.