Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r74223:f1a9e1e2d3c3
Date: 2014-10-25 16:32 +0200
http://bitbucket.org/pypy/pypy/changeset/f1a9e1e2d3c3/

Log:    fix warnings by the C compiler

diff --git a/rpython/translator/c/src/support.h 
b/rpython/translator/c/src/support.h
--- a/rpython/translator/c/src/support.h
+++ b/rpython/translator/c/src/support.h
@@ -49,12 +49,12 @@
      ((RPyCHECK((index) >= 0 && (index) < (array)->length),                 \
       (array))->items[index])
 #  define RPyFxItem(ptr, index, fixedsize)                                  \
-     ((RPyCHECK((ptr) && (index) >= 0 && (index) < (fixedsize)),            \
+     ((RPyCHECK((ptr) != NULL && (index) >= 0 && (index) < (fixedsize)),    \
       (ptr))[index])
 #  define RPyNLenItem(array, index)                                         \
-     ((RPyCHECK((array) && (index) >= 0), (array))->items[index])
+     ((RPyCHECK((array) != NULL && (index) >= 0), (array))->items[index])
 #  define RPyBareItem(array, index)                                         \
-     ((RPyCHECK((array) && (index) >= 0), (array))[index])
+     ((RPyCHECK((array) != NULL && (index) >= 0), (array))[index])
 
 #else
 #  define RPyField(ptr, name)                ((ptr)->name)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to