[Python-checkins] cpython: SystemExit_init(): avoid an useless test

victor.stinner python-checkins at python.org
Thu May 26 14:25:58 CEST 2011


http://hg.python.org/cpython/rev/772d9825f154
changeset:   70403:772d9825f154
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Thu May 26 14:25:54 2011 +0200
summary:
  SystemExit_init(): avoid an useless test

Make silent a false positive of the Clang Static Analyzer.

files:
  Objects/exceptions.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/exceptions.c b/Objects/exceptions.c
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -499,7 +499,7 @@
     Py_CLEAR(self->code);
     if (size == 1)
         self->code = PyTuple_GET_ITEM(args, 0);
-    else if (size > 1)
+    else /* size > 1 */
         self->code = args;
     Py_INCREF(self->code);
     return 0;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list