X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;ds=inline;f=util%2Fsnippet.c;h=9be51e97c6fae946aad820aae4f877a65ff7750c;hb=6a0f9234f945bc4956e2bcef75f715661a9eba9a;hp=0196def67f57867fce34d373fac80d34878e578b;hpb=97a7adeb9e5059463f039495cc01cfa448463a27;p=idzebra-moved-to-github.git diff --git a/util/snippet.c b/util/snippet.c index 0196def..9be51e9 100644 --- a/util/snippet.c +++ b/util/snippet.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1995-2008 Index Data + Copyright (C) 1994-2009 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -219,6 +219,11 @@ const struct zebra_snippet_word *zebra_snippets_lookup( for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) { const zebra_snippet_word *doc_w; + doc_w = zebra_snippets_constlist(doc); + if (!doc_w) + { + yaz_log(YLOG_WARN, "zebra_snippets_constlist returns 0"); + } for (doc_w = zebra_snippets_constlist(doc); doc_w; doc_w = doc_w->next) { if (doc_w->ord == hit_w->ord && doc_w->seqno == hit_w->seqno @@ -307,6 +312,7 @@ void zebra_snippets_ring(zebra_snippets *doc, const zebra_snippets *hit, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab