diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2019-11-14 17:12:44 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2019-11-14 18:06:42 +0100 |
commit | 153e55c20e9a3810a1862314a6465179e1b53931 (patch) | |
tree | befc888a766182031690dcbff95263d028804389 | |
parent | 44bf9c9a6af2d76d4de04b456362abd4ed454ff9 (diff) | |
download | lvm2-153e55c20e9a3810a1862314a6465179e1b53931.tar.gz |
cov: check for retvalue
-rw-r--r-- | tools/pvck.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/pvck.c b/tools/pvck.c index 231faf998..79fb8fbc7 100644 --- a/tools/pvck.c +++ b/tools/pvck.c @@ -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 |