Never do a ZERO_STRUCT on a structure in a linked list, it's dumb :-).
authorJeremy Allison <jra@samba.org>
Wed, 16 Oct 2002 20:09:51 +0000 (20:09 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 16 Oct 2002 20:09:51 +0000 (20:09 +0000)
Jeremy.
(This used to be commit 20986489f4736820a4981c6aa0eecccf169f0170)

source3/printing/printing.c

index 7a527eebbff95eb474a22c17b947a2591a209404..95d89159766deebd69d3ea51306c195d21419e2d 100644 (file)
@@ -183,7 +183,9 @@ static struct tdb_print_db *get_print_db_byname(const char *printername)
                                        return NULL;
                                }
                        }
-                       ZERO_STRUCTP(p);
+                       p->tdb = NULL;
+                       p->ref_count = 0;
+                       memset(p->printer_name, '\0', sizeof(p->printer_name));
                        break;
                }
                if (p) {