public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH 06/21] syscalls/unshare02: Replace ((int)NULL) with 0
Date: Tue, 3 Jan 2012 10:44:01 +0000	[thread overview]
Message-ID: <4F02DBF1.3090402@imgtec.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 49 bytes --]

Hi, please review the attached patch

-- 
markos

[-- Attachment #2: 0006-syscalls-unshare02-Replace-int-NULL-with-0.patch --]
[-- Type: text/plain, Size: 1179 bytes --]

From 269402e0cf64392442196ecf6c79d35d9e93c1af Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 11:57:17 +0000
Subject: [PATCH 06/21] syscalls/unshare02: Replace ((int)NULL) with 0

On non-32bit arches, casting a pointer to integer throws a compiler warning
because integers and pointers have different sizes in these arches. Therefore,
we replace the (int)NULL cast with 0 which has the same effect.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 testcases/kernel/syscalls/unshare/unshare02.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/syscalls/unshare/unshare02.c b/testcases/kernel/syscalls/unshare/unshare02.c
index 9f7b436..1a93932 100644
--- a/testcases/kernel/syscalls/unshare/unshare02.c
+++ b/testcases/kernel/syscalls/unshare/unshare02.c
@@ -181,7 +181,7 @@ int main(int ac, char **av) {
 				tst_brkm(TFAIL|TTERRNO, cleanup,
 					"fork() failed.");
 			} else if (TEST_RETURN == 0) {
-				TEST_RETURN = unshare((int)NULL);
+				TEST_RETURN = unshare(0);
 				if (TEST_RETURN == 0) {
 					tst_resm(TPASS, "Call succeeded");
 					rval = 0;
-- 
1.7.1


[-- Attachment #3: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2012-01-03 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 10:44 Markos Chandras [this message]
2012-01-03 19:37 ` [LTP] [PATCH 06/21] syscalls/unshare02: Replace ((int)NULL) with 0 Garrett Cooper
2012-01-03 20:39 ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F02DBF1.3090402@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox