dfregress(8): Check prop_dictionary_get_uint32()'s return value.
authorSascha Wildner <saw@online.de>
Tue, 16 Oct 2012 02:59:08 +0000 (04:59 +0200)
committerSascha Wildner <saw@online.de>
Tue, 16 Oct 2012 06:50:20 +0000 (08:50 +0200)
Consistent with the rest of the file.

Found-by: gcc47
usr.bin/dfregress/testcase.c

index b943534..f69883a 100644 (file)
@@ -264,10 +264,12 @@ uid_t
 testcase_get_runas_uid(prop_dictionary_t testcase)
 {
        uint32_t uid = 0;
-       int __unused r;
+       int r;
 
        r = prop_dictionary_get_uint32(
            prop_dictionary_get(testcase, "opts"), "runas_uid", &uid);
+       if (r == 0)
+               err(1, "prop_dictionary operation failed");
 
        return (uid_t)uid;
 }