summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cache.c4
-rw-r--r--src/erec.c2
-rw-r--r--src/optimize.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/cache.c b/src/cache.c
index 630d6ae1..8e8387f9 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -493,8 +493,8 @@ static int rule_cache_dump(struct netlink_ctx *ctx, const struct handle *h,
const struct nft_cache_filter *filter)
{
struct nftnl_rule_list *rule_cache;
- const char *table;
- const char *chain;
+ const char *table = NULL;
+ const char *chain = NULL;
if (filter) {
table = filter->list.table;
diff --git a/src/erec.c b/src/erec.c
index 32fb079f..a4b93fb0 100644
--- a/src/erec.c
+++ b/src/erec.c
@@ -111,7 +111,7 @@ void print_location(FILE *f, const struct input_descriptor *indesc,
const char *line_location(const struct input_descriptor *indesc,
const struct location *loc, char *buf, size_t bufsiz)
{
- const char *line;
+ const char *line = NULL;
FILE *f;
f = fopen(indesc->name, "r");
diff --git a/src/optimize.c b/src/optimize.c
index 76872caa..b5fb2c41 100644
--- a/src/optimize.c
+++ b/src/optimize.c
@@ -496,7 +496,7 @@ static void rule_optimize_print(struct output_ctx *octx,
{
const struct location *loc = &rule->location;
const struct input_descriptor *indesc = loc->indesc;
- const char *line;
+ const char *line = "";
char buf[1024];
switch (indesc->type) {