Re: [U-Boot] [PATCH 1/1] net: nfs: remove superfluous conversions

2019-09-03 Thread Joe Hershberger
On Mon, Sep 2, 2019 at 4:55 PM Heinrich Schuchardt wrote: > > rpc_pkt.u.call.data is an array of uint32_t. There is no need to convert > it to uint32_t *. > > memcpy() expects void * as it 1st and 2nd argument. There is no point in > converting pointers to char * before passing them to memcpy(). >

Re: [U-Boot] [PATCH 1/1] net: nfs: remove superfluous conversions

2019-09-02 Thread Bin Meng
On Tue, Sep 3, 2019 at 5:55 AM Heinrich Schuchardt wrote: > > rpc_pkt.u.call.data is an array of uint32_t. There is no need to convert > it to uint32_t *. > > memcpy() expects void * as it 1st and 2nd argument. There is no point in > converting pointers to char * before passing them to memcpy(). >

[U-Boot] [PATCH 1/1] net: nfs: remove superfluous conversions

2019-09-02 Thread Heinrich Schuchardt
rpc_pkt.u.call.data is an array of uint32_t. There is no need to convert it to uint32_t *. memcpy() expects void * as it 1st and 2nd argument. There is no point in converting pointers to char * before passing them to memcpy(). In ntohl(data[1]) != 0 calling ntohl() is superfluous. If the value is