summaryrefslogtreecommitdiffstats
path: root/src/ctx.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-25 11:54:14 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-25 11:54:14 -0400
commit598422e7678a719b37cc4221c637b840f4e13fcc (patch)
tree320093f34c26879f63b5567936161d51e34355c3 /src/ctx.c
parent2b72ce2ac0908dae4a39d30b91a28106928168b0 (diff)
downloadbfs-598422e7678a719b37cc4221c637b840f4e13fcc.tar.xz
sighook: Allow sigunhook(NULL)
Diffstat (limited to 'src/ctx.c')
-rw-r--r--src/ctx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ctx.c b/src/ctx.c
index fac501a..0f619c2 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -229,9 +229,7 @@ static int bfs_ctx_fclose(struct bfs_ctx *ctx, struct bfs_ctx_file *ctx_file) {
error = errno;
}
- if (ctx_file->hook) {
- sigunhook(ctx_file->hook);
- }
+ sigunhook(ctx_file->hook);
// Close the CFILE, except for stdio streams, which are closed later
if (cfile != ctx->cout && cfile != ctx->cerr) {