summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-16 01:28:11 +0000
committerJeremy Allison <jra@samba.org>2002-10-16 01:28:11 +0000
commitf55eb87af56b68b44e64a2dee5fcfe8248b718cf (patch)
tree5c15bb7c510ee657147e453fd9cf6d007f108ff9 /source3
parentd0c11644dc751f8a27efaa318f48064e43cc5eb2 (diff)
downloadsamba-f55eb87af56b68b44e64a2dee5fcfe8248b718cf.tar.gz
samba-f55eb87af56b68b44e64a2dee5fcfe8248b718cf.tar.bz2
samba-f55eb87af56b68b44e64a2dee5fcfe8248b718cf.zip
SMB_ASSERT to check list terminates.
Jeremy (This used to be commit 25f6a9247e88a94cbacdc8fb06dc0d13c53d69bd)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/printing.c3
1 files changed, 3 insertions, 0 deletions
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++;