summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-02-15 13:53:17 +0100
committerMaria Matejka <mq@ucw.cz>2019-02-20 22:30:55 +0100
commit0b39b1cbb70c6f37a30a3130e1c308ddd0ba36de (patch)
tree3eae8f33016a86cda9577620b27a8301f2b1d5cb /nest/proto.c
parent132529ce8908661fd2baa0758c335006fb039ef0 (diff)
Conf: Symbol implementation converted from void pointers to union
... and consted some declarations.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nest/proto.c b/nest/proto.c
index d4a333d0..77bf082a 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -977,7 +977,7 @@ protos_commit(struct config *new, struct config *old, int force_reconfig, int ty
{
/* Found match, let's check if we can smoothly switch to new configuration */
/* No need to check description */
- nc = sym->def;
+ nc = sym->proto;
nc->proto = p;
/* We will try to reconfigure protocol p */
@@ -1905,7 +1905,7 @@ proto_apply_cmd_symbol(struct symbol *s, void (* cmd)(struct proto *, uintptr_t,
return;
}
- cmd(((struct proto_config *)s->def)->proto, arg, 0);
+ cmd(s->proto->proto, arg, 0);
cli_msg(0, "");
}
@@ -1948,7 +1948,7 @@ proto_get_named(struct symbol *sym, struct protocol *pr)
if (sym->class != SYM_PROTO)
cf_error("%s: Not a protocol", sym->name);
- p = ((struct proto_config *) sym->def)->proto;
+ p = sym->proto->proto;
if (!p || p->proto != pr)
cf_error("%s: Not a %s protocol", sym->name, pr->name);
}