1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-21 22:04:19 +03:00

cov: check for retvalue

This commit is contained in:
Zdenek Kabelac 2019-11-14 17:12:44 +01:00
parent 44bf9c9a6a
commit 153e55c20e

View File

@ -359,7 +359,10 @@ static int _dump_all_text(struct cmd_context *cmd, const char *tofile, struct de
continue;
}
sscanf(line, "seqno = %u", &seqno);
if (sscanf(line, "seqno = %u", &seqno) != 1) {
log_warn("WARNING: Failed to parse seqno.");
seqno = 0; /* Skip? */
}
/*
* The first three lines look like metadata with