Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code simplification #93172

Closed
xtonik opened this issue May 24, 2022 · 2 comments
Closed

Code simplification #93172

xtonik opened this issue May 24, 2022 · 2 comments

Comments

@xtonik
Copy link

@xtonik xtonik commented May 24, 2022

if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) {

Branching is not necessary, suggested code:

rv = PyBytes_FromStringAndSize((char *)odata, out);
PyMem_Free(odata);
return rv;
@sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented May 24, 2022

Would you like to open a pull request?

@sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented May 25, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants