From 4c227a1d2080a03b19229b5cfb62f217c1047c84 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 9 Sep 2022 23:05:39 +0200 Subject: [PATCH] - xmlutil: simplify unlink calls Signed-off-by: Thilo Graf --- src/eitd/xmlutil.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index de8ae6384..64e35ea37 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -464,8 +464,7 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count, bool delete_after) debug(DEBUG_NORMAL, "unable to open %s for reading", epgname.c_str()); if (delete_after) { - int ret = unlink(epgname.c_str()); - if (ret != 0) + if (unlink(epgname.c_str())) printf("Failed to delete file: %s\n", epgname.c_str()); } return false; @@ -572,8 +571,7 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count, bool delete_after) if (delete_after) { - int ret = unlink(epgname.c_str()); - if (ret != 0) + if (unlink(epgname.c_str())) printf("Failed to delete file: %s\n", epgname.c_str()); }