Commit b7c0e6bf authored by Jim Fulton's avatar Jim Fulton

Added some missing returns in some, fortunately, infrequently (if

ever) accessed logic).
parent 63899d87
...@@ -253,6 +253,7 @@ firstBucketOffset(Bucket **bucket, int *offset) ...@@ -253,6 +253,7 @@ firstBucketOffset(Bucket **bucket, int *offset)
UNLESS (PER_USE(*bucket)) return -1; UNLESS (PER_USE(*bucket)) return -1;
*offset = 0; *offset = 0;
} }
return 1;
} }
static int static int
...@@ -270,6 +271,7 @@ lastBucketOffset(Bucket **bucket, int *offset, Bucket *firstbucket, int i) ...@@ -270,6 +271,7 @@ lastBucketOffset(Bucket **bucket, int *offset, Bucket *firstbucket, int i)
UNLESS (PER_USE(*bucket)) return -1; UNLESS (PER_USE(*bucket)) return -1;
*offset = (*bucket)->len - 1; *offset = (*bucket)->len - 1;
} }
return 1;
} }
static void * static void *
...@@ -279,7 +281,7 @@ PyMalloc(size_t sz) ...@@ -279,7 +281,7 @@ PyMalloc(size_t sz)
ASSERT(sz > 0, "non-positive size malloc", NULL); ASSERT(sz > 0, "non-positive size malloc", NULL);
if (r=malloc(sz)) return r; if ((r=malloc(sz))) return r;
PyErr_NoMemory(); PyErr_NoMemory();
return NULL; return NULL;
...@@ -338,7 +340,7 @@ static char BTree_module_documentation[] = ...@@ -338,7 +340,7 @@ static char BTree_module_documentation[] =
"\n" "\n"
MASTER_ID MASTER_ID
BTREEITEMSTEMPLATE_C BTREEITEMSTEMPLATE_C
"$Id: BTreeModuleTemplate.c,v 1.8 2001/03/27 16:37:42 jim Exp $\n" "$Id: BTreeModuleTemplate.c,v 1.9 2001/04/01 20:25:24 jim Exp $\n"
BTREETEMPLATE_C BTREETEMPLATE_C
BUCKETTEMPLATE_C BUCKETTEMPLATE_C
KEYMACROS_H KEYMACROS_H
...@@ -407,7 +409,7 @@ INITMODULE () ...@@ -407,7 +409,7 @@ INITMODULE ()
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyDict_SetItemString(d, "__version__", PyDict_SetItemString(d, "__version__",
PyString_FromString("$Revision: 1.8 $")); PyString_FromString("$Revision: 1.9 $"));
PyExtensionClass_Export(d,MOD_NAME_PREFIX "Bucket", BucketType); PyExtensionClass_Export(d,MOD_NAME_PREFIX "Bucket", BucketType);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "BTree", BTreeType); PyExtensionClass_Export(d,MOD_NAME_PREFIX "BTree", BTreeType);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment