From e3b0fb8e03240ba2809bf59db1975f8114134fa1 Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Tue, 17 Apr 2007 12:15:32 +0000 Subject: [PATCH] added five asserts to make sure that the arguments of reclist_insert do exist --- src/reclists.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/reclists.c b/src/reclists.c index 4097e71..ed5c0ec 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -1,4 +1,4 @@ -/* $Id: reclists.c,v 1.11 2007-04-17 07:52:03 marc Exp $ +/* $Id: reclists.c,v 1.12 2007-04-17 12:15:32 marc Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -214,12 +214,13 @@ struct record_cluster *reclist_insert( struct reclist *l, struct record_cluster *cluster = 0; assert(service); - assert(service->num_metadata); - assert(service->num_sortkeys); + assert(l); + assert(record); assert(merge_key); - + assert(total); bucket = hash((unsigned char*) merge_key) & l->hashmask; + for (p = &l->hashtable[bucket]; *p; p = &(*p)->next) { // We found a matching record. Merge them -- 1.7.10.4