Check-in [f470355838]

Not logged in

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

Overview
SHA1 Hash:f4703558382e33033dd653b0b0ace03a920301a6
Date: 2009-06-08 23:59:43
User: stephan
Comment:fixed a minor telemetry-counting error in whhash_table_create()
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to whhash.c

Old (6a4c505dee2c12e5) New (edb5f480b16c6520)
1 /* Copyright (C) 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */ 1 /* Copyright (C) 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */
2 /* Copyright (C) 2008 Stephan Beal (http://wanderinghorse.net/home/stephan/) */ 2 /* Copyright (C) 2008 Stephan Beal (http://wanderinghorse.net/home/stephan/) */
3 3
4 #include "whhash.h" 4 #include "whhash.h"
5 #include <stdlib.h> 5 #include <stdlib.h>
170 hidden lines
176 for (pindex=0; pindex < prime_table_length; pindex++) { 176 for (pindex=0; pindex < prime_table_length; pindex++) {
177 if (primes[pindex] > minsize) { size = primes[pindex]; break; } 177 if (primes[pindex] > minsize) { size = primes[pindex]; break; }
178 } 178 }
179 h = (whhash_table *)malloc(sizeof(whhash_table)); 179 h = (whhash_table *)malloc(sizeof(whhash_table));
180 if (NULL == h) return NULL; /*oom*/ 180 if (NULL == h) return NULL; /*oom*/
181 h->stats.alloced = sizeof(whhash_table); <
182 *h = whhash_init; 181 *h = whhash_init;
> 182 h->stats.alloced = sizeof(whhash_table);
183 h->freeKey = 0; 183 h->freeKey = 0;
184 h->freeVal = 0; 184 h->freeVal = 0;
185 #if 0 185 #if 0
186 h->table = (whhash_entry **)malloc(sizeof(whhash_entry*) * size); 186 h->table = (whhash_entry **)malloc(sizeof(whhash_entry*) * size);
187 if(h->table) memset(h->table, 0, size * sizeof(whhash_entry *)); 187 if(h->table) memset(h->table, 0, size * sizeof(whhash_entry *));
670 hidden lines
858 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 858 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
859 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 859 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
860 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 860 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
861 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 861 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
862 */ 862 */