[U-Boot] [PATCH 2/9] net: nfs: Correct the reply data buffer size

Joe Hershberger joe.hershberger at ni.com
Mon Aug 15 22:03:20 CEST 2016


The type of the buffer is uint32_t, but the parameter used to size it
is referring to bytes. Divide by the size of the array elements.

Strictly speaking, this shouldn't be needed at all... It could just be 1
just like the request.

Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
---

 net/nfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/nfs.h b/net/nfs.h
index 45da246..aa4e450 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -76,7 +76,7 @@ struct rpc_t {
 			uint32_t verifier;
 			uint32_t v2;
 			uint32_t astatus;
-			uint32_t data[NFS_READ_SIZE];
+			uint32_t data[NFS_READ_SIZE / sizeof(uint32_t)];
 		} reply;
 	} u;
 };
-- 
1.7.11.5



More information about the U-Boot mailing list