From 598422e7678a719b37cc4221c637b840f4e13fcc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 25 May 2024 11:54:14 -0400 Subject: sighook: Allow sigunhook(NULL) --- src/ctx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ctx.c') 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) { -- cgit v1.2.3