diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-10 15:13:15 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-10 15:13:15 -0400 |
commit | 4250d9bcfcf9dbc95418c64932ad39f71ff2019e (patch) | |
tree | a50b979c8817af4017e595928da6dc4524b37d40 /src/main.c | |
parent | ed3f041df1d891b188fabfc055547c076ce6e85e (diff) | |
download | stasis-4250d9bcfcf9dbc95418c64932ad39f71ff2019e.tar.gz |
Use do/while in guard_* macros to make them behave more like functions
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -122,20 +122,20 @@ static void usage(char *progname) { } void globals_free() { - guard_free(globals.tmpdir) - guard_free(globals.sysconfdir) - guard_free(globals.conda_install_prefix) - guard_strlist_free(globals.conda_packages) - guard_strlist_free(globals.pip_packages) - guard_free(globals.sysconfdir) - guard_free(globals.jfrog.arch) - guard_free(globals.jfrog.os) - guard_free(globals.jfrog.repo) - guard_free(globals.jfrog.version) - guard_free(globals.jfrog.cli_major_ver) - guard_free(globals.jfrog.jfrog_artifactory_base_url) - guard_free(globals.jfrog.jfrog_artifactory_product) - guard_free(globals.jfrog.remote_filename) + guard_free(globals.tmpdir); + guard_free(globals.sysconfdir); + guard_free(globals.conda_install_prefix); + guard_strlist_free(globals.conda_packages); + guard_strlist_free(globals.pip_packages); + guard_free(globals.sysconfdir); + guard_free(globals.jfrog.arch); + guard_free(globals.jfrog.os); + guard_free(globals.jfrog.repo); + guard_free(globals.jfrog.version); + guard_free(globals.jfrog.cli_major_ver); + guard_free(globals.jfrog.jfrog_artifactory_base_url); + guard_free(globals.jfrog.jfrog_artifactory_product); + guard_free(globals.jfrog.remote_filename); } int main(int argc, char *argv[], char *arge[]) { @@ -277,7 +277,7 @@ int main(int argc, char *argv[], char *arge[]) { // Override Python version from command-line, if any if (strlen(python_override_version)) { - guard_free(ctx.meta.python) + guard_free(ctx.meta.python); ctx.meta.python = strdup(python_override_version); guard_free(ctx.meta.python_compact); ctx.meta.python_compact = to_short_version(ctx.meta.python); @@ -524,7 +524,7 @@ int main(int argc, char *argv[], char *arge[]) { delivery_free(&ctx); globals_free(); tpl_free(); - guard_free(config_input) + guard_free(config_input); msg(OMC_MSG_L1, "Done!\n"); return 0; |