aboutsummaryrefslogtreecommitdiff
path: root/src/template.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-03-10 15:13:15 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-03-10 15:13:15 -0400
commit4250d9bcfcf9dbc95418c64932ad39f71ff2019e (patch)
treea50b979c8817af4017e595928da6dc4524b37d40 /src/template.c
parented3f041df1d891b188fabfc055547c076ce6e85e (diff)
downloadstasis-4250d9bcfcf9dbc95418c64932ad39f71ff2019e.tar.gz
Use do/while in guard_* macros to make them behave more like functions
Diffstat (limited to 'src/template.c')
-rw-r--r--src/template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/template.c b/src/template.c
index 2314dbb..4fff31c 100644
--- a/src/template.c
+++ b/src/template.c
@@ -183,7 +183,7 @@ int tpl_render_to_file(char *str, const char *filename) {
// Open the destination file for writing
fp = fopen(filename, "w+");
if (!fp) {
- guard_free(result)
+ guard_free(result);
return -1;
}
@@ -191,6 +191,6 @@ int tpl_render_to_file(char *str, const char *filename) {
fprintf(fp, "%s", result);
fclose(fp);
- guard_free(result)
+ guard_free(result);
return 0;
} \ No newline at end of file