From 5a29dd30e0117a59714fa083a946997f2355eede Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 5 Oct 2007 05:01:38 +0000 Subject: Fix Coverity #159. This code was broken if save() returned a negative number since i contained a boolean value and then we compared i < 0 which should never be true. Will backport (assuming it's necessary) --- Modules/cPickle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/cPickle.c b/Modules/cPickle.c index fbf6a12..227f02c 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -2249,7 +2249,7 @@ save_reduce(Picklerobject *self, PyObject *args, PyObject *ob) Py_INCREF(temp); PyTuple_SET_ITEM(newargtup, i-1, temp); } - i = save(self, newargtup, 0) < 0; + i = save(self, newargtup, 0); Py_DECREF(newargtup); if (i < 0) return -1; -- cgit v0.12