[dpdk-dev] [PATCH] lib/librte_power: fix using variables before validity check

Pattan, Reshma reshma.pattan at intel.com
Tue May 11 15:34:33 CEST 2021



> -----Original Message-----
> From: Min Hu (Connor) <humin29 at huawei.com>
> > Another suggestion if you would like to improve the code, is below,
> > You can move "global_fds[lcore_id]"  check to immediate after  the line
> "fds.fd = global_fds[lcore_id]; "
> Hi, thanks Pattan.
> But I think "global_fds[lcore_id]"  check may move before the line
> "fds.fd = global_fds[lcore_id];
> If it failed, "fds.fd = global_fds[lcore_id];" should not be performed.
> What's your opinion?
> 

That is correct.  You can do that change.


More information about the dev mailing list