]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
test: Remove static FILE declaration from fpurge test
authorDuncan Overbruck <mail@duncano.de>
Mon, 24 Jan 2022 15:47:00 +0000 (16:47 +0100)
committerGuillem Jover <guillem@hadrons.org>
Wed, 26 Jan 2022 03:39:42 +0000 (04:39 +0100)
This does not work with libcs that do not declare the structure
in a header file, like musl. And gets in the way of supporting
non-fd based streams.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
test/fpurge.c

index a99cff70ba89aa23a89235c189d2bc6cede34d5f..1118f234af86140c9f44c222d3b7149471516be8 100644 (file)
 int
 main(int argc, char *argv[])
 {
-       static FILE fp_bad;
        FILE *fp;
 
        if (fpurge(NULL) == 0)
                return 1;
 
-       if (fpurge(&fp_bad) == 0)
-               return 1;
-
        fp = fopen("/dev/zero", "r");
        if (fpurge(fp) < 0)
                return 1;