Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jan 7, 2024
1 parent 5e22968 commit 4db6e6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Objects/moduleobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,7 @@ _Py_module_getattro_impl(PyModuleObject *m, PyObject *name, int suppress)
if (origin && is_name_stdlib_module(mod_name)) {
wchar_t cwd[MAXPATHLEN], origin_dirname[MAXPATHLEN];
if(_Py_wgetcwd(cwd, MAXPATHLEN)) {
int rc = PyUnicode_AsWideChar(origin, origin_dirname, MAXPATHLEN);
if (rc < 0) {
if (PyUnicode_AsWideChar(origin, origin_dirname, MAXPATHLEN) < 0) {
goto done;
}
wchar_t *sep = wcsrchr(origin_dirname, SEP);
Expand Down

0 comments on commit 4db6e6c

Please sign in to comment.