diff mbox

[V9fs-developer] net/9p: Use proper data types

Message ID 1294246423-8454-1-git-send-email-mohan@in.ibm.com (mailing list archive)
State Superseded, archived
Delegated to: Eric Van Hensbergen
Headers show

Commit Message

M. Mohan Kumar Jan. 5, 2011, 4:53 p.m. UTC
None
diff mbox

Patch

diff --git a/net/9p/protocol.c b/net/9p/protocol.c
index c5180fd..2902eb1 100644
--- a/net/9p/protocol.c
+++ b/net/9p/protocol.c
@@ -234,14 +234,14 @@  p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
 			}
 			break;
 		case 'D':{
-				int32_t *count = va_arg(ap, int32_t *);
+				uint32_t *count = va_arg(ap, int32_t *);
 				void **data = va_arg(ap, void **);
 
 				errcode =
 				    p9pdu_readf(pdu, proto_version, "d", count);
 				if (!errcode) {
 					*count =
-					    min_t(int32_t, *count,
+					    min_t(uint32_t, *count,
 						  pdu->size - pdu->offset);
 					*data = &pdu->sdata[pdu->offset];
 				}
@@ -404,9 +404,9 @@  p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt,
 			break;
 		case 's':{
 				const char *sptr = va_arg(ap, const char *);
-				int16_t len = 0;
+				uint16_t len = 0;
 				if (sptr)
-					len = min_t(int16_t, strlen(sptr),
+					len = min_t(uint16_t, strlen(sptr),
 								USHRT_MAX);
 
 				errcode = p9pdu_writef(pdu, proto_version,