]> granicus.if.org Git - p11-kit/commitdiff
common: Fix in test-code for file descriptor validity check
authorPankaj <pankaj.s01@samsung.com>
Fri, 6 Nov 2015 06:13:00 +0000 (06:13 +0000)
committerStef Walter <stefw@redhat.com>
Mon, 9 Nov 2015 08:41:57 +0000 (09:41 +0100)
https://bugs.freedesktop.org/show_bug.cgi?id=92843

common/test-compat.c

index 3af33ac5aab4ac7a458b575e0bc4f45b2e14216b..e28698ee034bd361cd908da5bbc4324178bb471f 100644 (file)
@@ -117,6 +117,7 @@ test_mmap (void)
        size_t size;
        char file[] = "emptyfileXXXXXX";
        int fd = mkstemp (file);
+       assert (fd >= 0);
        close (fd);
        /* mmap on empty file should work */
        map = p11_mmap_open (file, NULL, &data, &size);