Commit c5a722cc authored by Michael Tremer's avatar Michael Tremer

writer: Add an empty string to the stringpool

This is useful when we have some offset that isn't initialised. It will
point to the start of the string pool which is some random string that
happened to be added first.

An empty string at least signifies better that something is unset.
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 60d5aceb
......@@ -102,6 +102,13 @@ LOC_EXPORT int loc_writer_new(struct loc_ctx* ctx, struct loc_writer** writer,
return r;
}
// Add an empty string to the stringpool
r = loc_stringpool_add(w->pool, "");
if (r) {
loc_writer_unref(w);
return r;
}
// Initialize the network tree
r = loc_network_tree_new(ctx, &w->networks);
if (r) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment