diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-09-25 21:06:59 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-09-29 18:19:53 +0200 |
commit | 4b4cee0c0c99f531a45157fd27f5441e511db109 (patch) | |
tree | 825aae023f27c2f578536af35dfd01b1dc96e18e /tests/fstree_fuzz.c | |
parent | d87bffd89b9c0a26a65f0c629250fa87902b6cb8 (diff) |
Replace file/getline usage with istream
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/fstree_fuzz.c')
-rw-r--r-- | tests/fstree_fuzz.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/fstree_fuzz.c b/tests/fstree_fuzz.c index 42d8942..9618814 100644 --- a/tests/fstree_fuzz.c +++ b/tests/fstree_fuzz.c @@ -15,29 +15,20 @@ int main(int argc, char **argv) { int ret = EXIT_FAILURE; fstree_t fs; - FILE *fp; if (argc != 2) { fputs("Usage: fstree_fuzz <input_file>\n", stderr); return EXIT_FAILURE; } - fp = fopen(argv[1], "r"); - if (fp == NULL) { - perror(argv[1]); - return EXIT_FAILURE; - } - if (fstree_init(&fs, NULL)) - goto out_fp; + return EXIT_FAILURE; - if (fstree_from_file(&fs, argv[1], fp)) + if (fstree_from_file(&fs, argv[1])) goto out_fs; ret = EXIT_SUCCESS; out_fs: fstree_cleanup(&fs); -out_fp: - fclose(fp); return ret; } |