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

Bin Meng bmeng.cn at gmail.com
Mon Sep 2 22:52:53 UTC 2019


On Tue, Sep 3, 2019 at 5:55 AM Heinrich Schuchardt <xypron.glpk at gmx.de> 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().
>
> In ntohl(data[1]) != 0 calling ntohl() is superfluous. If the value is
> zero, does not depend on the byte order.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  net/nfs.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list