]> granicus.if.org Git - python/commitdiff
getinstclassname(): Squash new compiler wng in assert (comparison of
authorTim Peters <tim.peters@gmail.com>
Tue, 20 Aug 2002 14:31:35 +0000 (14:31 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 20 Aug 2002 14:31:35 +0000 (14:31 +0000)
signed vs unsigned).

Objects/classobject.c

index cbbb3c46bc133bf67f90d5b9c0a733f61fcd308a..f698cc323df70711b4b7865a12320f69a724fa71 100644 (file)
@@ -2328,7 +2328,7 @@ getinstclassname(PyObject *inst, char *buf, int bufsize)
        PyObject *class;
 
        if (inst == NULL) {
-               assert(bufsize > strlen("nothing"));
+               assert(bufsize > 0 && (size_t)bufsize > strlen("nothing"));
                strcpy(buf, "nothing");
                return;
        }