From 9efbe769c364103a58ba679fe96eb6e3210c3b01 Mon Sep 17 00:00:00 2001 From: nkk71 Date: Tue, 13 Jun 2017 19:49:05 +0300 Subject: Fix incorrect 'unlink' return value check Change-Id: I430f6bb21a5fd87e0422420463e8bb96c4a612e1 --- partition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partition.cpp b/partition.cpp index 1f57a534f..543e8674b 100644 --- a/partition.cpp +++ b/partition.cpp @@ -2124,7 +2124,7 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media_Func(const string& parent __unu } rmdir(dir.c_str()); } else if (de->d_type == DT_REG || de->d_type == DT_LNK || de->d_type == DT_FIFO || de->d_type == DT_SOCK) { - if (!unlink(dir.c_str())) + if (unlink(dir.c_str()) != 0) LOGINFO("Unable to unlink '%s': %s\n", dir.c_str(), strerror(errno)); } } -- cgit v1.2.3