aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/ctx.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-13 23:44:17 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-13 23:44:17 +0100
commit6dc12e00c852b143429b3db0c01cb9abcf102b8f (patch)
treecdb22574107bda34431f3572607505573a20f1df /src/blogc-make/ctx.c
parentbddf3b851e19b448d0bafb7a3b43d320731ce296 (diff)
downloadblogc-6dc12e00c852b143429b3db0c01cb9abcf102b8f.tar.gz
blogc-6dc12e00c852b143429b3db0c01cb9abcf102b8f.tar.bz2
blogc-6dc12e00c852b143429b3db0c01cb9abcf102b8f.zip
Revert "make: fixed context reloading"
This reverts commit 89e2a39d1ee66a233b1cd21606ba66b32b902b08. This commit was reverted only to test the clang-analyzer travis job.
Diffstat (limited to 'src/blogc-make/ctx.c')
-rw-r--r--src/blogc-make/ctx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/blogc-make/ctx.c b/src/blogc-make/ctx.c
index 0a3f9a0..8e152da 100644
--- a/src/blogc-make/ctx.c
+++ b/src/blogc-make/ctx.c
@@ -270,20 +270,20 @@ bm_ctx_new(bm_ctx_t *base, const char *settings_file, const char *argv0,
bool
-bm_ctx_reload(bm_ctx_t **ctx)
+bm_ctx_reload(bm_ctx_t *ctx)
{
- if (*ctx == NULL || (*ctx)->settings_fctx == NULL)
+ if (ctx == NULL || ctx->settings_fctx == NULL)
return false;
- if (bm_filectx_changed((*ctx)->settings_fctx, NULL, NULL)) {
+ if (bm_filectx_changed(ctx->settings_fctx, NULL, NULL)) {
// reload everything! we could just reload settings_fctx, as this
// would force rebuilding everything, but we need to know new/deleted
// files
// needs to dup path, because it may be freed when reloading.
- char *tmp = bc_strdup((*ctx)->settings_fctx->path);
+ char *tmp = bc_strdup(ctx->settings_fctx->path);
bc_error_t *err = NULL;
- *ctx = bm_ctx_new(*ctx, tmp, NULL, &err);
+ ctx = bm_ctx_new(ctx, tmp, NULL, &err);
free(tmp);
if (err != NULL) {
bc_error_print(err, "blogc-make");
@@ -293,16 +293,16 @@ bm_ctx_reload(bm_ctx_t **ctx)
return true;
}
- bm_filectx_reload((*ctx)->main_template_fctx);
- bm_filectx_reload((*ctx)->atom_template_fctx);
+ bm_filectx_reload(ctx->main_template_fctx);
+ bm_filectx_reload(ctx->atom_template_fctx);
- for (bc_slist_t *tmp = (*ctx)->posts_fctx; tmp != NULL; tmp = tmp->next)
+ for (bc_slist_t *tmp = ctx->posts_fctx; tmp != NULL; tmp = tmp->next)
bm_filectx_reload((bm_filectx_t*) tmp->data);
- for (bc_slist_t *tmp = (*ctx)->pages_fctx; tmp != NULL; tmp = tmp->next)
+ for (bc_slist_t *tmp = ctx->pages_fctx; tmp != NULL; tmp = tmp->next)
bm_filectx_reload((bm_filectx_t*) tmp->data);
- for (bc_slist_t *tmp = (*ctx)->copy_fctx; tmp != NULL; tmp = tmp->next)
+ for (bc_slist_t *tmp = ctx->copy_fctx; tmp != NULL; tmp = tmp->next)
bm_filectx_reload((bm_filectx_t*) tmp->data);
return true;