From 13b8aa9381cda67496399eb5e3404d40f72a77fc Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 27 May 2020 16:42:27 -0400 Subject: [PATCH] ctrl: warn if we fail to unlink to appease coverity scans Signed-off-by: Peter Hunt --- src/ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ctrl.c b/src/ctrl.c index 5075d1a0..e8642568 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -32,7 +32,8 @@ gboolean terminal_accept_cb(int fd, G_GNUC_UNUSED GIOCondition condition, G_GNUC /* Not accepting anything else. */ const char *csname = user_data; - unlink(csname); + if (unlink(csname) < 0) + nwarnf("failed to unlink %s", csname); close(fd); /* We exit if this fails. */