It's incorrect to close a file twice, so remove the redundance code.
Signed-off-by: Bian Naimeng <[email protected]>
---
testcases/kernel/syscalls/lchown/lchown01.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/lchown/lchown01.c
b/testcases/kernel/syscalls/lchown/lchown01.c
index 1ac3bb3..344bfd5 100644
--- a/testcases/kernel/syscalls/lchown/lchown01.c
+++ b/testcases/kernel/syscalls/lchown/lchown01.c
@@ -218,9 +218,6 @@ void setup(void)
if (close(fd) == -1) {
tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TESTFILE);
}
-
- if (close(fd) == -1)
- tst_brkm(TBROK|TERRNO, cleanup, "close(2) %s", TESTFILE);
if (symlink(TESTFILE, SFILE) < 0) {
tst_brkm(TBROK|TERRNO, cleanup, "symlink(2) %s to %s failed",
--
1.7.0.4
--
Regards
Bian Naimeng
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list