X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/6489a1abd8d32d7a4e7b61d4e758495aff1ca2c5..67805159a972397342c342ee735c8acd640e1399:/dbck/phase3.qc diff --git a/dbck/phase3.qc b/dbck/phase3.qc index 4bc5dc91..0a85f746 100644 --- a/dbck/phase3.qc +++ b/dbck/phase3.qc @@ -27,16 +27,16 @@ struct list *l; * increments the string reference count. */ -int string_check(id) +struct string *string_check(id) int id; { register struct string *s; s = (struct string *) hash_lookup(strings, id); if (s == NULL) - return(0); + return(s); s->refc++; - return(1); + return(s); } @@ -65,11 +65,13 @@ phase3() ##{ printf("Phase 3 - Finding unused objects\n"); - dprintf("Checking machines...\n"); - hash_step(machines, noclu_mach_check, NULL); + if (warn) { + dprintf("Checking machines...\n"); + hash_step(machines, noclu_mach_check, NULL); - dprintf("Checking lists...\n"); - hash_step(lists, empty_list_check, NULL); + dprintf("Checking lists...\n"); + hash_step(lists, empty_list_check, NULL); + } dprintf("Checking strings...\n"); hash_step(strings, unref_string_check, NULL);