summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-16 01:28:42 +0000
committerJeremy Allison <jra@samba.org>2002-10-16 01:28:42 +0000
commit64876b9fb8b7ee3dd73d754070ae24ca36826350 (patch)
tree5ce81bba810da3093d6e1e577ce62f7789f31381
parent3d8274df34a9f7d2a1f221534f7c32bfb4450f87 (diff)
downloadsamba-64876b9fb8b7ee3dd73d754070ae24ca36826350.tar.gz
samba-64876b9fb8b7ee3dd73d754070ae24ca36826350.tar.bz2
samba-64876b9fb8b7ee3dd73d754070ae24ca36826350.zip
SMB_ASSERT to check list terminates.
Jeremy. (This used to be commit bf3b0ef56168aff9b1bd5760b595f8951d434861)
-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++;