Hi, please review the attached patch

--
markos
>From ff5db5fee1bff9a29aca9cdeaf5fbe00b806d4ea Mon Sep 17 00:00:00 2001
From: Markos Chandras <[email protected]>
Date: Thu, 22 Dec 2011 15:18:25 +0000
Subject: [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer 
with 0

Because pointers are 64-bit on x86_64 architectures, casting a pointer to
integer makes the compiler complain about casting pointer to integer of
different size. We can easily fix this warning by simple replace (int)NULL with
0.

Signed-off-by: Markos Chandras <[email protected]>
---
 testcases/network/nfs/nfsstress/make_tree.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/network/nfs/nfsstress/make_tree.c 
b/testcases/network/nfs/nfsstress/make_tree.c
index c51e75e..c0b4d22 100644
--- a/testcases/network/nfs/nfsstress/make_tree.c
+++ b/testcases/network/nfs/nfsstress/make_tree.c
@@ -771,7 +771,7 @@ main(int    argc,           /* number of input parameters   
              */
         switch(c)
         {
             case 'd':          /* specify how deep the tree needs to grow    */
-               if ((num_dirs = atoi(optarg)) == (int)NULL)
+               if ((num_dirs = atoi(optarg)) == 0)
                    OPT_MISSING(argv[0], optopt);
                 else
                 if (num_dirs < 0)
@@ -782,7 +782,7 @@ main(int    argc,           /* number of input parameters   
              */
                 }
                break;
             case 'f':          /* how many ".c" files in each directory.     */
-               if ((num_files = atoi(optarg)) == (int)NULL)
+               if ((num_files = atoi(optarg)) == 0)
                     OPT_MISSING(argv[0], optopt);
                 else
                if (num_files < 0)
@@ -796,7 +796,7 @@ main(int    argc,           /* number of input parameters   
              */
                 usage(argv[0]);
                 break;
             case 't':
-               if ((num_thrd = atoi(optarg)) == (int)NULL)
+               if ((num_thrd = atoi(optarg)) == 0)
                    OPT_MISSING(argv[0], optopt);
                 else
                 if (num_thrd < 0)
-- 
1.7.1

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to