mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- xmlutil: simplify unlink calls
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -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());
|
debug(DEBUG_NORMAL, "unable to open %s for reading", epgname.c_str());
|
||||||
if (delete_after)
|
if (delete_after)
|
||||||
{
|
{
|
||||||
int ret = unlink(epgname.c_str());
|
if (unlink(epgname.c_str()))
|
||||||
if (ret != 0)
|
|
||||||
printf("Failed to delete file: %s\n", epgname.c_str());
|
printf("Failed to delete file: %s\n", epgname.c_str());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -572,8 +571,7 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count, bool delete_after)
|
|||||||
|
|
||||||
if (delete_after)
|
if (delete_after)
|
||||||
{
|
{
|
||||||
int ret = unlink(epgname.c_str());
|
if (unlink(epgname.c_str()))
|
||||||
if (ret != 0)
|
|
||||||
printf("Failed to delete file: %s\n", epgname.c_str());
|
printf("Failed to delete file: %s\n", epgname.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user