]> sourceware.org Git - lvm2.git/commitdiff
cov: check for retvalue
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 14 Nov 2019 16:12:44 +0000 (17:12 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 14 Nov 2019 17:06:42 +0000 (18:06 +0100)
tools/pvck.c

index 231faf9984a21cb8dacaf774c921f1762131f043..79fb8fbc7bd99d82d5c885c977459f795477ff55 100644 (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
This page took 0.034223 seconds and 5 git commands to generate.