module: zfs: dsl_bookmark: silence false-positive maybe-uninitialised

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13247
Closes #13258
This commit is contained in:
наб 2022-03-28 19:03:13 +02:00 committed by GitHub
parent 063c83a853
commit 7db823bd61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -160,10 +160,9 @@ dsl_bookmark_create_nvl_validate_pair(const char *bmark, const char *source)
int int
dsl_bookmark_create_nvl_validate(nvlist_t *bmarks) dsl_bookmark_create_nvl_validate(nvlist_t *bmarks)
{ {
char *first; char *first = NULL;
size_t first_len; size_t first_len = 0;
first = NULL;
for (nvpair_t *pair = nvlist_next_nvpair(bmarks, NULL); for (nvpair_t *pair = nvlist_next_nvpair(bmarks, NULL);
pair != NULL; pair = nvlist_next_nvpair(bmarks, pair)) { pair != NULL; pair = nvlist_next_nvpair(bmarks, pair)) {