[LTP] [PATCH 3/3] syscalls/mknod*: Fix compiler warnings

Jinhui Huang huangjh.jy@cn.fujitsu.com
Fri Mar 2 09:02:24 CET 2018


Signed-off-by: Jinhui Huang <huangjh.jy@cn.fujitsu.com>
---
 testcases/kernel/syscalls/mknod/mknod02.c | 2 +-
 testcases/kernel/syscalls/mknod/mknod03.c | 2 +-
 testcases/kernel/syscalls/mknod/mknod04.c | 2 +-
 testcases/kernel/syscalls/mknod/mknod05.c | 2 +-
 testcases/kernel/syscalls/mknod/mknod08.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/syscalls/mknod/mknod02.c b/testcases/kernel/syscalls/mknod/mknod02.c
index e5741c3..594473e 100644
--- a/testcases/kernel/syscalls/mknod/mknod02.c
+++ b/testcases/kernel/syscalls/mknod/mknod02.c
@@ -173,7 +173,7 @@ int main(int ac, char **av)
 	}
 
 	/* Change the directory back to temporary directory */
-	chdir("..");
+	SAFE_CHDIR(cleanup, "..");
 
 	/*
 	 * Invoke cleanup() to delete the test directories created
diff --git a/testcases/kernel/syscalls/mknod/mknod03.c b/testcases/kernel/syscalls/mknod/mknod03.c
index fc34686..2af66f7 100644
--- a/testcases/kernel/syscalls/mknod/mknod03.c
+++ b/testcases/kernel/syscalls/mknod/mknod03.c
@@ -172,7 +172,7 @@ int main(int ac, char **av)
 	}
 
 	/* Change the directory back to temporary directory */
-	chdir("..");
+	SAFE_CHDIR(cleanup, "..");
 
 	/*
 	 * Invoke cleanup() to delete the test directories created
diff --git a/testcases/kernel/syscalls/mknod/mknod04.c b/testcases/kernel/syscalls/mknod/mknod04.c
index 6a8e08e..e0123ec 100644
--- a/testcases/kernel/syscalls/mknod/mknod04.c
+++ b/testcases/kernel/syscalls/mknod/mknod04.c
@@ -172,7 +172,7 @@ int main(int ac, char **av)
 	}
 
 	/* Change the directory back to temporary directory */
-	chdir("..");
+	SAFE_CHDIR(cleanup, "..");
 
 	/*
 	 * Invoke cleanup() to delete the test directories created
diff --git a/testcases/kernel/syscalls/mknod/mknod05.c b/testcases/kernel/syscalls/mknod/mknod05.c
index a00a0e4..fbc5575 100644
--- a/testcases/kernel/syscalls/mknod/mknod05.c
+++ b/testcases/kernel/syscalls/mknod/mknod05.c
@@ -171,7 +171,7 @@ int main(int ac, char **av)
 	}
 
 	/* change the directory back to temporary directory */
-	chdir("..");
+	SAFE_CHDIR(cleanup, "..");
 
 	/*
 	 * Invoke cleanup() to delete the test directories created
diff --git a/testcases/kernel/syscalls/mknod/mknod08.c b/testcases/kernel/syscalls/mknod/mknod08.c
index 3cc24ab..8647fde 100644
--- a/testcases/kernel/syscalls/mknod/mknod08.c
+++ b/testcases/kernel/syscalls/mknod/mknod08.c
@@ -170,7 +170,7 @@ int main(int ac, char **av)
 	}
 
 	/* Change the directory back to temporary directory */
-	chdir("..");
+	SAFE_CHDIR(cleanup, "..");
 
 	/*
 	 * Invoke cleanup() to delete the test directories created
-- 
1.8.3.1





More information about the ltp mailing list