aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch
blob: a710b1e5761df793723abddb0a1649c3a5521e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 63de116c617a35ff3d54c785b3dfb5378bb07f46 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 12 Aug 2020 22:39:17 -0700
Subject: [PATCH] src/parse.c: Initialize key to NULL

Fixes

src/parse.c:810:22: note: 'key' was declared here
cc1: all warnings being treated as errors

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/parse.c b/src/parse.c
index 63a0863..c66277f 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -807,7 +807,7 @@ handle_addresses(yaml_document_t* doc, yaml_node_t* node, const void* _, GError*
         char* prefix_len;
         guint64 prefix_len_num;
         yaml_node_t *entry = yaml_document_get_node(doc, *i);
-        yaml_node_t *key, *value = NULL;
+        yaml_node_t *key = NULL, *value = NULL;
 
         if (entry->type != YAML_SCALAR_NODE && entry->type != YAML_MAPPING_NODE) {
             return yaml_error(entry, error, "expected either scalar or mapping (check indentation)");
-- 
2.28.0