summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/peephole.c4
-rw-r--r--Python/pystrhex.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Python/peephole.c b/Python/peephole.c
index 3e56e788b0..d859648411 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -255,8 +255,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
than +255 (encoded as multiple bytes), just to keep the peephole optimizer
simple. The optimizer leaves line number deltas unchanged. */
- for (j = 0; j < tabsiz; j += 2) {
- if (lnotab[j] == 255) {
+ for (i = 0; i < tabsiz; i += 2) {
+ if (lnotab[i] == 255) {
goto exitUnchanged;
}
}
diff --git a/Python/pystrhex.c b/Python/pystrhex.c
index 5dc7c96137..9d34f71a2e 100644
--- a/Python/pystrhex.c
+++ b/Python/pystrhex.c
@@ -57,7 +57,7 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
}
resultlen += arglen * 2;
- if (abs_bytes_per_sep >= arglen) {
+ if ((size_t)abs_bytes_per_sep >= (size_t)arglen) {
bytes_per_sep_group = 0;
abs_bytes_per_sep = 0;
}