Skip to content

Commit

Permalink
tidy: Remove unused assignments in MainServer::DeleteFile.
Browse files Browse the repository at this point in the history
The clang-tidy "dead stores" checker pointed out two places where the
result of a system call is assigned to a variable, but the variable is
never used.  Remove these the dead assignments.  If there's an error,
the function will print the content of errno before it exits.
  • Loading branch information
linuxdude42 committed Mar 28, 2019
1 parent 05f0d81 commit a33871d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/programs/mythbackend/mainserver.cpp
Expand Up @@ -2645,12 +2645,12 @@ int MainServer::DeleteFile(const QString &filename, bool followLinks,
if (followLinks && finfo.isSymLink())
{
if (!finfo.exists() && deleteBrokenSymlinks)
err = unlink(fname.constData());
unlink(fname.constData());
else
{
fd = OpenAndUnlink(linktext);
if (fd >= 0)
err = unlink(fname.constData());
unlink(fname.constData());
}
}
else if (!finfo.isSymLink())
Expand Down

0 comments on commit a33871d

Please sign in to comment.