NetworkManager/src/nm-cloud-setup
Thomas Haller 0d773e7930
nm-cloud-setup: simplify clearing variables in retry loop
The label "try_again" is only reached by one goto. So it was correct
and sufficient to reset the state only there.

It is still error prone. The slighlty clearer approach is to clear
the state at each begin of the "try_again" step.

There should be no change in behavior.

I didn't confirm, but an optimizing compiler should (could) be able
to see that the cleanup is only necessary on retry, and generate the
same code as before. In any case, we should write code that is easier
to read, not optimize for something that a compiler should be able to
optimize itself.

(cherry picked from commit 911b550140)
2022-12-19 14:47:27 +01:00
..
tests format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
90-nm-cloud-setup.sh cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
main.c nm-cloud-setup: simplify clearing variables in retry loop 2022-12-19 14:47:27 +01:00
meson.build cloud-setup: configure secondary ip in Aliyun cloud 2021-07-19 17:41:52 +02:00
nm-cloud-setup-utils.c nm-cloud-setup: set preserve-external-ip flag during reapply 2022-12-19 14:47:25 +01:00
nm-cloud-setup-utils.h nm-cloud-setup: set preserve-external-ip flag during reapply 2022-12-19 14:47:25 +01:00
nm-cloud-setup.service.in cloud-setup: configure secondary ip in Aliyun cloud 2021-07-19 17:41:52 +02:00
nm-cloud-setup.timer cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nm-http-client.c all: prefer nm wrappers to automatically attach GSource to default context 2022-03-13 11:59:42 +01:00
nm-http-client.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmcs-provider-aliyun.c all: use internal _nm_utils_ip4_netmask_to_prefix() 2022-06-27 10:50:24 +02:00
nmcs-provider-aliyun.h cloud-setup: configure secondary ip in Aliyun cloud 2021-07-19 17:41:52 +02:00
nmcs-provider-azure.c cloud-setup: track config-task-data in iface-data 2022-05-05 08:37:29 +02:00
nmcs-provider-azure.h cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nmcs-provider-ec2.c cloud-setup: only pass config-iface-data as user-data for async functions 2022-05-05 08:37:29 +02:00
nmcs-provider-ec2.h cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nmcs-provider-gcp.c cloud-setup: track config-task-data in iface-data 2022-05-05 08:37:29 +02:00
nmcs-provider-gcp.h cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nmcs-provider.c cloud-setup: use union for NMCSProviderGetConfigIfaceData.priv 2022-05-05 08:37:29 +02:00
nmcs-provider.h cloud-setup: use union for NMCSProviderGetConfigIfaceData.priv 2022-05-05 08:37:29 +02:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00

nm-cloud-setup

A NetworkManager client application that aims to automatically configure the network in a cloud environment.

See:

  • man 8 nm-cloud-setup ([www])