Skip to content

Commit

Permalink
Fix comparison between signed and unsigned warning
Browse files Browse the repository at this point in the history
A similar fix was applied to CPython in https://bugs.python.org/issue22218
  • Loading branch information
mgedmin committed Sep 21, 2017
1 parent fde3990 commit ac5ecbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zodbpickle/_pickle_33.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Pdata_grow(Pdata *self)
if (new_allocated > PY_SSIZE_T_MAX - allocated)
goto nomemory;
new_allocated += allocated;
if (new_allocated > (PY_SSIZE_T_MAX / sizeof(PyObject *)))
if ((size_t)new_allocated > ((size_t)PY_SSIZE_T_MAX / sizeof(PyObject *)))
goto nomemory;
data = PyMem_REALLOC(data, new_allocated * sizeof(PyObject *));
if (data == NULL)
Expand Down

0 comments on commit ac5ecbd

Please sign in to comment.