Whamcloud - gitweb
libuuid: check return value of uuid_parse() in test
authorTheodore Ts'o <tytso@mit.edu>
Thu, 9 Jan 2014 20:06:50 +0000 (15:06 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 9 Jan 2014 20:06:50 +0000 (15:06 -0500)
Addresses-Coverity-Id: #709477

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/uuid/tst_uuid.c

index 33fb80b..88d928f 100644 (file)
@@ -154,7 +154,10 @@ main(int argc ATTR((unused)) , char **argv ATTR((unused)))
                printf("UUID time comparison succeeded.\n");
        }
 
-       uuid_parse(str, tst);
+       if (uuid_parse(str, tst) < 0) {
+               printf("UUID parse failed\n");
+               failed++;
+       }
        if (!uuid_compare(buf, tst)) {
                printf("UUID parse and compare succeeded.\n");
        } else {