(svn r3642) There is a 'npf' debug level for a reason, use that instead of bastardizing 'misc'. Also, pointers are checked against NULL in an if-statement
authorDarkvater
Tue, 21 Feb 2006 01:15:59 +0000
changeset 3053 403425c55a3c
parent 3052 ebb8c7a94e5f
child 3054 0cde017ea45d
(svn r3642) There is a 'npf' debug level for a reason, use that instead of bastardizing 'misc'. Also, pointers are checked against NULL in an if-statement
npf.c
--- a/npf.c	Mon Feb 20 23:40:53 2006 +0000
+++ b/npf.c	Tue Feb 21 01:15:59 2006 +0000
@@ -697,11 +697,11 @@
 	assert(r != AYSTAR_STILL_BUSY);
 
 	if (result.best_bird_dist != 0) {
-		if (target) {
-			DEBUG(misc, 1) ("NPF: Could not find route to 0x%x from 0x%x.", target->dest_coords, start1->tile);
+		if (target != NULL) {
+			DEBUG(npf, 1) ("Could not find route to tile 0x%x from 0x%x.", target->dest_coords, start1->tile);
 		} else {
 			/* Assumption: target == NULL, so we are looking for a depot */
-			DEBUG(misc, 1) ("NPF: Could not find route to a depot from 0x%x.", start1->tile);
+			DEBUG(npf, 1) ("Could not find route to a depot from tile 0x%x.", start1->tile);
 		}
 
 	}
@@ -849,7 +849,7 @@
 			best_result = result;
 	}
 	if (result.best_bird_dist != 0) {
-		DEBUG(misc, 1) ("NPF: Could not find route to any depot from 0x%x.", tile);
+		DEBUG(npf, 1) ("Could not find route to any depot from tile 0x%x.", tile);
 	}
 	return best_result;
 }