/ Check-in [326fc9cc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make genericAllocationSize work on NULL pointers. (CVS 2842)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 326fc9cc11c86f2d96763537d60757200ce21a84
User & Date: drh 2005-12-22 13:47:50
Context
2005-12-29
01:11
Add support for DROP TABLE IF EXISTS. (CVS 2843) check-in: a4c547de user: drh tags: trunk
2005-12-22
13:47
Make genericAllocationSize work on NULL pointers. (CVS 2842) check-in: 326fc9cc user: drh tags: trunk
2005-12-21
18:36
Bug fixes and additional testing of descending indices. (CVS 2841) check-in: 5638a11e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/os_common.h.

   152    152     return (void *)((char *)p2 + 8);
   153    153   }
   154    154   static void genericFree(void *p){
   155    155     assert(p);
   156    156     free((void *)((char *)p - 8));
   157    157   }
   158    158   static int genericAllocationSize(void *p){
   159         -  return *(int *)((char *)p - 8);
          159  +  return p ? *(int *)((char *)p - 8) : 0;
   160    160   }
   161         -