]> andersk Git - splint.git/blobdiff - src/ctype.c
Made allocations involving sizeof work correctly (test/malloc.c).
[splint.git] / src / ctype.c
index 8ed249fa7e3a58bb92337d027e33a3e1755dca69..8253a71322221fd2a311ca5efe8751eebc3a622d 100644 (file)
@@ -460,7 +460,8 @@ ctype_baseArrayPtr (ctype c)
 
       if (ctype_isBroken (clp))
        {
-         llbuglit ("ctype_baseArrayPtr: bogus ctype");
+         llcontbug (message ("ctype_baseArrayPtr: bogus ctype getting base of: %s", ctype_unparse (c)));
+         return ctype_unknown;
        }
 
       return clp;
@@ -2838,7 +2839,7 @@ size_t ctype_getArraySize (ctype c)
 
 ctype ctype_biggerType (ctype c1, ctype c2)
 {
-  if (ctbase_isBigger (ctype_getCtbaseSafe (c2), ctype_getCtbaseSafe (c1)) )
+  if (ctbase_isBigger (ctype_getCtbaseSafe (c2), ctype_getCtbaseSafe (c1)))
     {
       return c2;
     }
@@ -2847,3 +2848,8 @@ ctype ctype_biggerType (ctype c1, ctype c2)
       return c1;
     }
 }
+
+int ctype_getSize (ctype c)
+{
+  return ctbase_getSize (ctype_getCtbaseSafe (ctype_realType (c)));
+}
This page took 0.040131 seconds and 4 git commands to generate.