You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that use brackets for a singular function on the "if" statements.
(example: if(n) { printf("n\n"); } )
In reality, these brackets don't have to be there, since it's just one function for the conditional statement.
Describe the solution you'd like
Instead of
if (libHandle == NVHDMIPKT_INVALID_HANDLE)
{
return NVHDMIPKT_LIBRARY_INIT_FAIL;
}
use
if (libHandle == NVHDMIPKT_INVALID_HANDLE)
return NVHDMIPKT_LIBRARY_INIT_FAIL;
Describe alternatives you've considered
Ternary operators can also be used for if-else statements.
Additional context
This all falls under better code style, and makes no functional difference.
In my eyes, it helps for readability.
Activity
TrickyDmitriy commentedon May 12, 2022
This is not an enhancement and do not follows the current code style.
So issue should be closed in order to de-clutter "Issues" board ;)
Connor-GH commentedon May 12, 2022
Fair enough.
Zezombye commentedon May 13, 2022
https://www.zdnet.com/article/apples-goto-fail-tells-us-nothing-good-about-cupertinos-software-delivery-process/
Always use braces and if you don't, put the statement on the same line so you're not misled by indentation.