Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review: remove unneeded rc variables
  • Loading branch information
erlend-aasland committed May 23, 2022
commit f0fb621dc139c142a1b1eb47606b737a85888486
6 changes: 2 additions & 4 deletions Modules/xxlimited_35.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ create_and_add_type(PyObject *module, const char *name, PyType_Spec *spec)
if (type == NULL) {
return NULL;
}
int rc = PyModule_AddObject(module, name, type);
if (rc < 0) {
if (PyModule_AddObject(module, name, type) < 0) {
Py_DECREF(type);
return NULL;
}
Expand All @@ -269,8 +268,7 @@ xx_modexec(PyObject *m)
}
}
Py_INCREF(ErrorObject);
int rc = PyModule_AddObject(m, "error", ErrorObject);
if (rc < 0) {
if (PyModule_AddObject(m, "error", ErrorObject) < 0) {
Comment thread
erlend-aasland marked this conversation as resolved.
Py_DECREF(ErrorObject);
return -1;
}
Expand Down