aboutsummaryrefslogtreecommitdiffstats
path: root/ctimeline.c
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-05-19 07:40:42 +0000
committerJoursoir <chat@joursoir.net>2021-05-19 07:40:42 +0000
commit17c4d7a48c3c9bf7052b6a47d9e3bc66d554def4 (patch)
tree7f5fbea94a85bb44375f806236c08d40a937a085 /ctimeline.c
parentbbf29455ed723ef4e9be95033e7aca2ea6a72a91 (diff)
downloadctimeline-17c4d7a48c3c9bf7052b6a47d9e3bc66d554def4.tar.gz
ctimeline-17c4d7a48c3c9bf7052b6a47d9e3bc66d554def4.tar.bz2
ctimeline-17c4d7a48c3c9bf7052b6a47d9e3bc66d554def4.zip
xstring: make string assignment using string_(n)alloc
* Code in ctimeline have rewritten using updated function
Diffstat (limited to 'ctimeline.c')
-rw-r--r--ctimeline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ctimeline.c b/ctimeline.c
index 6ecbca3..cfb4e05 100644
--- a/ctimeline.c
+++ b/ctimeline.c
@@ -69,10 +69,10 @@ struct ctimeline_branch *add_branch(const char *name)
}
br = &ctx.branches.list[ctx.branches.count-1];
- br->name = string_alloc(name);
+ br->name = string_alloc(NULL, name);
br->age_from = 0;
br->age_to = 0;
- br->desc = string_alloc("No description");
+ br->desc = string_alloc(NULL, "No description");
return br;
}
@@ -91,8 +91,8 @@ void handle_config_context(const char *name, const char *value)
ctx.cur_branch->age_to = atoi(value);
}
else if(strcmp(name, "branch.desc") == 0) {
- string_release(ctx.cur_branch->desc);
- ctx.cur_branch->desc = string_alloc(value);
+ ctx.cur_branch->desc = string_alloc(
+ ctx.cur_branch->desc, value);
}
}