From 7db823bd613507679aa2bf2829538210b25f8471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 28 Mar 2022 19:03:13 +0200 Subject: [PATCH] module: zfs: dsl_bookmark: silence false-positive maybe-uninitialised MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Reviewed-by: Damian Szuberski Signed-off-by: Ahelenia ZiemiaƄska Closes #13247 Closes #13258 --- module/zfs/dsl_bookmark.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/zfs/dsl_bookmark.c b/module/zfs/dsl_bookmark.c index df43ff2180..44fc399a6b 100644 --- a/module/zfs/dsl_bookmark.c +++ b/module/zfs/dsl_bookmark.c @@ -160,10 +160,9 @@ dsl_bookmark_create_nvl_validate_pair(const char *bmark, const char *source) int dsl_bookmark_create_nvl_validate(nvlist_t *bmarks) { - char *first; - size_t first_len; + char *first = NULL; + size_t first_len = 0; - first = NULL; for (nvpair_t *pair = nvlist_next_nvpair(bmarks, NULL); pair != NULL; pair = nvlist_next_nvpair(bmarks, pair)) {