change log for rtems (2010-05-25)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue May 25 15:10:52 UTC 2010


 *ralf*:
2010-05-25	Ralf Corsépius <ralf.corsepius at rtems.org>

	* librpc/src/rpc/rpc_prot.c: Partial merger from freebsd
	(Improved 64 bit compatibility; bug fix).

M 1.2303  cpukit/ChangeLog
M    1.7  cpukit/librpc/src/rpc/rpc_prot.c

diff -u rtems/cpukit/ChangeLog:1.2302 rtems/cpukit/ChangeLog:1.2303
--- rtems/cpukit/ChangeLog:1.2302	Sun May 23 01:30:22 2010
+++ rtems/cpukit/ChangeLog	Tue May 25 09:12:53 2010
@@ -1,3 +1,8 @@
+2010-05-25	Ralf Corsépius <ralf.corsepius at rtems.org>
+
+	* librpc/src/rpc/rpc_prot.c: Partial merger from freebsd
+	(Improved 64 bit compatibility; bug fix).
+
 2010-05-23	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	PR 1528/cpukit

diff -u rtems/cpukit/librpc/src/rpc/rpc_prot.c:1.6 rtems/cpukit/librpc/src/rpc/rpc_prot.c:1.7
--- rtems/cpukit/librpc/src/rpc/rpc_prot.c:1.6	Sat Mar 27 21:35:23 2010
+++ rtems/cpukit/librpc/src/rpc/rpc_prot.c	Tue May 25 09:12:53 2010
@@ -50,6 +50,7 @@
 #include "config.h"
 #endif
 
+#include <assert.h>
 #include <sys/param.h>
 
 #include <rpc/rpc.h>
@@ -71,6 +72,9 @@
 	struct opaque_auth *ap)
 {
 
+	assert(xdrs != NULL);
+	assert(ap != NULL);
+
 	if (xdr_enum(xdrs, &(ap->oa_flavor)))
 		return (xdr_bytes(xdrs, &ap->oa_base,
 			&ap->oa_length, MAX_AUTH_BYTES));
@@ -85,6 +89,10 @@
 	XDR *xdrs,
 	des_block *blkp)
 {
+
+	assert(xdrs != NULL);
+	assert(blkp != NULL);
+
 	return (xdr_opaque(xdrs, (caddr_t)blkp, sizeof(des_block)));
 }
 
@@ -118,7 +126,6 @@
 	case SYSTEM_ERR:
 	case PROC_UNAVAIL:
 	case PROG_UNAVAIL:
-/*	default: */
 		break;
 	}
 	return (TRUE);  /* TRUE => open ended set of problems */
@@ -203,6 +210,8 @@
 	struct rpc_err *error)
 {
 
+	assert(error != NULL);
+
 	switch (acpt_stat) {
 
 	case PROG_UNAVAIL:
@@ -231,8 +240,8 @@
 	}
 	/* something's wrong, but we don't know what ... */
 	error->re_status = RPC_FAILED;
-	error->re_lb.s1 = (long)MSG_ACCEPTED;
-	error->re_lb.s2 = (long)acpt_stat;
+	error->re_lb.s1 = (int32_t)MSG_ACCEPTED;
+	error->re_lb.s2 = (int32_t)acpt_stat;
 }
 
 static void
@@ -241,22 +250,21 @@
 	struct rpc_err *error)
 {
 
-	switch (rjct_stat) {
+	assert(error != NULL);
 
-	case RPC_VERSMISMATCH:
+	switch (rjct_stat) {
+	case RPC_MISMATCH:
 		error->re_status = RPC_VERSMISMATCH;
 		return;
 
 	case AUTH_ERROR:
 		error->re_status = RPC_AUTHERROR;
 		return;
-	default:
-		break;
 	}
 	/* something's wrong, but we don't know what ... */
 	error->re_status = RPC_FAILED;
-	error->re_lb.s1 = (long)MSG_DENIED;
-	error->re_lb.s2 = (long)rjct_stat;
+	error->re_lb.s1 = (int32_t)MSG_DENIED;
+	error->re_lb.s2 = (int32_t)rjct_stat;
 }
 
 /*
@@ -268,6 +276,9 @@
 	struct rpc_err *error)
 {
 
+	assert(msg != NULL);
+	assert(error != NULL);
+
 	/* optimized for normal, SUCCESSful case */
 	switch (msg->rm_reply.rp_stat) {
 
@@ -285,7 +296,7 @@
 
 	default:
 		error->re_status = RPC_FAILED;
-		error->re_lb.s1 = (long)(msg->rm_reply.rp_stat);
+		error->re_lb.s1 = (int32_t)(msg->rm_reply.rp_stat);
 		break;
 	}
 	switch (error->re_status) {



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100525/66c2b9c0/attachment.html>


More information about the vc mailing list