* Use 'tst_tmpdir' and 'tst_rmdir'.
* Add 'static' for the cleanup.

Signed-off-by: Zeng Linggang <zenglg...@cn.fujitsu.com>
---
 testcases/network/lib6/asapi_03.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/testcases/network/lib6/asapi_03.c 
b/testcases/network/lib6/asapi_03.c
index f458d7d..61be294 100644
--- a/testcases/network/lib6/asapi_03.c
+++ b/testcases/network/lib6/asapi_03.c
@@ -181,6 +181,7 @@ static struct ftent {
 };
 
 static void setup(void);
+static void cleanup(void);
 static void do_test(const struct ftent *);
 
 char *TCID = "asapi_03";
@@ -201,15 +202,23 @@ int main(int argc, char *argv[])
                        do_test(&ftab[i]);
        }
 
+       cleanup();
        tst_exit();
 }
 
-void setup(void)
+static void setup(void)
 {
        TEST_PAUSE;
+
+       tst_tmpdir();
+}
+
+static void cleanup(void)
+{
+       tst_rmdir();
 }
 
-void do_test(const struct ftent *ftptr)
+static void do_test(const struct ftent *ftptr)
 {
        switch (ftptr->ft_type) {
        case EXISTS:
-- 
1.9.3


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to