X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/5eaef52092da48d922a6b37cf48bb7c5104d0841..7ac48069b111a991ee5975cb6088c4563b57b670:/dbck/phase3.pc diff --git a/dbck/phase3.pc b/dbck/phase3.pc index 2f7a27b9..312dd857 100644 --- a/dbck/phase3.pc +++ b/dbck/phase3.pc @@ -1,19 +1,25 @@ -/* $Header$ +/* $Id$ * - * (c) Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * . + * (c) Copyright 1988-1998 by the Massachusetts Institute of Technology. + * For copying and distribution information, please see the file + * . */ #include -#include +#include #include "dbck.h" -static char phase3_qc_rcsid[] = "$Header$"; +#include + +RCSID("$Header$"); +void empty_list_check(int id, void *list, void *hint); +void unref_string_check(int id, void *string, void *hint); +void noclu_mach_check(int id, void *machine, void *hint); -empty_list_check(int id, struct list *l, int hint) +void empty_list_check(int id, void *list, void *hint) { + struct list *l = list; if (l->members == 0 && l->list_id != 0) printf("Warning: List %s is empty\n", l->name); } @@ -26,7 +32,7 @@ empty_list_check(int id, struct list *l, int hint) struct string *string_check(int id) { - register struct string *s; + struct string *s; s = (struct string *) hash_lookup(strings, id); if (!s) @@ -36,8 +42,10 @@ struct string *string_check(int id) } -unref_string_check(int id, struct string *s, int hint) +void unref_string_check(int id, void *string, void *hint) { + struct string *s = string; + if (s->refc == 0) { printf("Unreferenced string %s id %d\n", s->name, id); @@ -51,15 +59,15 @@ unref_string_check(int id, struct string *s, int hint) * servers in the Athena Computing Environment, has been extended to * manage all hosts in the MIT.EDU domain (but not subdomains). */ -#ifndef ATHENA -noclu_mach_check(int id, struct machine *m, int hint) +void noclu_mach_check(int id, void *machine, void *hint) { + struct machine *m = machine; + if (m->clucount == 0 && m->mach_id != 0) printf("Warning: machine %s is not in any clusters\n", m->name); } -#endif -phase3(void) +void phase3(void) { printf("Phase 3 - Finding unused objects\n");