]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvr: Fix incorrect usage of `strerror`
authorTianyi Liu <i.pear@outlook.com>
Tue, 6 Feb 2024 07:11:37 +0000 (15:11 +0800)
committerFlole998 <Flole998@users.noreply.github.com>
Thu, 8 Feb 2024 01:10:31 +0000 (02:10 +0100)
`strerror` takes the `errno` directly as its argument,
negating it will result in an "Unknown error".

Signed-off-by: Tianyi Liu <i.pear@outlook.com>
src/dvr/dvr_db.c

index 318b7f30e23e8ed6d8ae00f188a3c785e0f23290..84b4654a808d50a6d7ac3106d0d624c611dcb118 100644 (file)
@@ -4933,7 +4933,7 @@ dvr_entry_delete(dvr_entry_t *de)
       r = deferred_unlink(filename, rdir);
       if(r && r != -ENOENT)
         tvhwarn(LS_DVR, "Unable to remove file '%s' from disk -- %s",
-               filename, strerror(-errno));
+               filename, strerror(errno));
 
       cmd = de->de_config->dvr_postremove;
       if (cmd && cmd[0])