public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 15/21] fs/stream: ret variable is has an integer type not size_t
@ 2012-01-03 13:20 Markos Chandras
  2012-01-03 20:30 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Markos Chandras @ 2012-01-03 13:20 UTC (permalink / raw)
  To: ltp-list

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

Hi, please review the attached patch

-- 
markos

[-- Attachment #2: 0015-fs-stream-ret-variable-is-has-an-integer-type-not-si.patch --]
[-- Type: text/plain, Size: 1417 bytes --]

From fd8d55e8194f7e56d35c4a291e5a64aa09f24237 Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 14:53:01 +0000
Subject: [PATCH 15/21] fs/stream: ret variable is has an integer type not size_t

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 testcases/kernel/fs/stream/stream04.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/fs/stream/stream04.c b/testcases/kernel/fs/stream/stream04.c
index 6ecac08..f88e395 100644
--- a/testcases/kernel/fs/stream/stream04.c
+++ b/testcases/kernel/fs/stream/stream04.c
@@ -88,7 +88,7 @@ int main(int ac, char *av[])
 		}
 
 		if ((size_t)ret != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk) = %zi != return value from fwrite = %zi", strlen(junk), ret);
+			tst_resm(TFAIL,"strlen(junk) = %zi != return value from fwrite = %d", strlen(junk), ret);
 			local_flag = FAILED;
 		}
 
@@ -109,7 +109,7 @@ int main(int ac, char *av[])
 			tst_exit();
 		}
 		if ((size_t)ret != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk) = %zi != return value from fread = %zi", strlen(junk), ret);
+			tst_resm(TFAIL,"strlen(junk) = %zi != return value from fread = %d", strlen(junk), ret);
 			local_flag = FAILED;
 		}
 		fclose(stream);
@@ -123,4 +123,4 @@ int main(int ac, char *av[])
 	} /* end for */
 	tst_rmdir();
 	tst_exit();
-}
\ No newline at end of file
+}
-- 
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

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

* Re: [LTP] [PATCH 15/21] fs/stream: ret variable is has an integer type not size_t
  2012-01-03 13:20 [LTP] [PATCH 15/21] fs/stream: ret variable is has an integer type not size_t Markos Chandras
@ 2012-01-03 20:30 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2012-01-03 20:30 UTC (permalink / raw)
  To: ltp-list; +Cc: Markos Chandras


[-- Attachment #1.1: Type: Text/Plain, Size: 265 bytes --]

On Tuesday 03 January 2012 08:20:56 Markos Chandras wrote:
> Hi, please review the attached patch

seems to me the proper fix in this file is to make "ret" into a "size_t".  it 
holds the return values of fwrite/fread which both return size_t, not int.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: 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 #3: Type: text/plain, Size: 155 bytes --]

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

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

end of thread, other threads:[~2012-01-03 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 13:20 [LTP] [PATCH 15/21] fs/stream: ret variable is has an integer type not size_t Markos Chandras
2012-01-03 20:30 ` Mike Frysinger

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