public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/3] syscalls/fchmod*: Fix compiler warnings
@ 2018-03-02  8:02 Jinhui Huang
  2018-03-02  8:02 ` [LTP] [PATCH 2/3] syscalls/pipe*: " Jinhui Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jinhui Huang @ 2018-03-02  8:02 UTC (permalink / raw)
  To: ltp

Signed-off-by: Jinhui Huang <huangjh.jy@cn.fujitsu.com>
---
 testcases/kernel/syscalls/fchmod/fchmod05.c | 4 ++--
 testcases/kernel/syscalls/fchmod/fchmod07.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/fchmod/fchmod05.c b/testcases/kernel/syscalls/fchmod/fchmod05.c
index 7a27028..cdd3d07 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod05.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod05.c
@@ -220,8 +220,8 @@ void cleanup(void)
 	/* Close the test directory opened in the setup() */
 	SAFE_CLOSE(NULL, fd);
 
-	setegid(0);
-	seteuid(0);
+	SAFE_SETEGID(NULL, 0);
+	SAFE_SETEUID(NULL, 0);
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fchmod/fchmod07.c b/testcases/kernel/syscalls/fchmod/fchmod07.c
index 66032e4..6973555 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod07.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod07.c
@@ -83,7 +83,7 @@ int fd;				/* file descriptor for testfile */
 char *TCID = "fchmod07";
 int TST_TOTAL = 8;		/* Total number of test conditions */
 
-int Modes[] = { 0, 07, 070, 0700, 0777, 02777, 04777, 06777 };
+mode_t Modes[] = { 0, 07, 070, 0700, 0777, 02777, 04777, 06777 };
 
 void setup();			/* setup function for the test */
 void cleanup();			/* cleanup function for the test */
@@ -93,7 +93,7 @@ int main(int ac, char **av)
 	struct stat stat_buf;	/* stat(2) struct contents */
 	int lc;
 	int ind;		/* counter variable for chmod(2) tests */
-	int mode;		/* file mode permission */
+	mode_t mode;		/* file mode permission */
 
 	TST_TOTAL = sizeof(Modes) / sizeof(int);
 
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-06 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02  8:02 [LTP] [PATCH 1/3] syscalls/fchmod*: Fix compiler warnings Jinhui Huang
2018-03-02  8:02 ` [LTP] [PATCH 2/3] syscalls/pipe*: " Jinhui Huang
2018-03-05  8:03   ` Petr Vorel
2018-03-06  1:41     ` jinhui huang
2018-03-06 15:03       ` Petr Vorel
2018-03-02  8:02 ` [LTP] [PATCH 3/3] syscalls/mknod*: " Jinhui Huang
2018-03-05  9:21   ` Petr Vorel
2018-03-05  7:48 ` [LTP] [PATCH 1/3] syscalls/fchmod*: " Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox