]> andersk Git - moira.git/blobdiff - dbck/phase3.qc
Used /bin/sh format instead of /bin/csh format, by accident.
[moira.git] / dbck / phase3.qc
index 4bc5dc91788d0e445684a87d54303e75aacf2760..0a85f74666cf850229329c47acb1257fbadee90f 100644 (file)
@@ -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);
This page took 0.047295 seconds and 4 git commands to generate.