diff mbox series

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

Message ID 1519977744-1595-3-git-send-email-huangjh.jy@cn.fujitsu.com
State Accepted
Headers show
Series [1/3] syscalls/fchmod*: Fix compiler warnings | expand

Commit Message

Jinhui huang March 2, 2018, 8:02 a.m. UTC
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(-)

Comments

Petr Vorel March 5, 2018, 9:21 a.m. UTC | #1
Hi Jinhui,

> 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

Pushed, thanks!

Kind regards,
Petr
diff mbox series

Patch

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