summaryrefslogtreecommitdiff
path: root/conf/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf/conf.c')
-rw-r--r--conf/conf.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/conf/conf.c b/conf/conf.c
index 8d4d28e3..a2837886 100644
--- a/conf/conf.c
+++ b/conf/conf.c
@@ -56,6 +56,7 @@
#include "conf/conf.h"
#include "filter/filter.h"
+
static jmp_buf conf_jmpbuf;
struct config *config, *new_config;
@@ -85,7 +86,7 @@ int undo_available; /* Undo was not requested from last reconfiguration */
* further use. Returns a pointer to the structure.
*/
struct config *
-config_alloc(byte *name)
+config_alloc(const char *name)
{
pool *p = rp_new(&root_pool, "Config");
linpool *l = lp_new(p, 4080);
@@ -96,6 +97,7 @@ config_alloc(byte *name)
char *ndup = lp_allocu(l, nlen);
memcpy(ndup, name, nlen);
+ init_list(&c->tests);
c->mrtdump_file = -1; /* Hack, this should be sysdep-specific */
c->pool = p;
c->mem = l;
@@ -405,7 +407,7 @@ config_confirm(void)
* if it's been queued due to another reconfiguration being in progress now,
* %CONF_UNQUEUED if a scheduled reconfiguration is removed, %CONF_NOTHING
* if there is no relevant configuration to undo (the previous config request
- * was config_undo() too) or %CONF_SHUTDOWN if BIRD is in shutdown mode and
+ * was config_undo() too) or %CONF_SHUTDOWN if BIRD is in shutdown mode and
* no new configuration changes are accepted.
*/
int
@@ -450,7 +452,7 @@ config_undo(void)
extern void cmd_reconfig_undo_notify(void);
static void
-config_timeout(struct timer *t)
+config_timeout(struct timer *t UNUSED)
{
log(L_INFO "Config timeout expired, starting undo");
cmd_reconfig_undo_notify();
@@ -512,6 +514,7 @@ cf_error(const char *msg, ...)
va_start(args, msg);
if (bvsnprintf(buf, sizeof(buf), msg, args) < 0)
strcpy(buf, "<bug: error message too long>");
+ va_end(args);
new_config->err_msg = cfg_strdup(buf);
new_config->err_lino = ifs->lino;
new_config->err_file_name = ifs->file_name;
@@ -529,7 +532,7 @@ cf_error(const char *msg, ...)
* and we want to preserve it for further use.
*/
char *
-cfg_strdup(char *c)
+cfg_strdup(const char *c)
{
int l = strlen(c) + 1;
char *z = cfg_allocu(l);