From 64876b9fb8b7ee3dd73d754070ae24ca36826350 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Oct 2002 01:28:42 +0000 Subject: SMB_ASSERT to check list terminates. Jeremy. (This used to be commit bf3b0ef56168aff9b1bd5760b595f8951d434861) --- source3/printing/printing.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 91851a37f8..7a527eebbf 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -156,6 +156,9 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) pstring printdb_path; for (p = print_db_head, last_entry = print_db_head; p; p = p->next) { + /* Ensure the list terminates... JRA. */ + SMB_ASSERT(p->next != print_db_head); + if (p->tdb && strequal(p->printer_name, printername)) { DLIST_PROMOTE(print_db_head, p); p->ref_count++; -- cgit