MCPcopy Create free account
hub / github.com/codr7/hacktical-c / file_deinit

Function file_deinit

stream1/stream1.c:91–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void file_deinit(struct hc_stream *s) {
92 struct hc_file_stream *fs = hc_baseof(s, struct hc_file_stream, stream);
93
94 if (fs->opts.close_file) {
95 assert(fs->file);
96
97 if (fclose(fs->file) == EOF) {
98 hc_throw("Failed closing file");
99 }
100
101 fs->file = NULL;
102 }
103}
104
105struct hc_file_stream *_hc_file_stream_init(struct hc_file_stream *s,
106 FILE *file,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected