Index: trunk/psphot/src/psphotOutput.c
===================================================================
--- trunk/psphot/src/psphotOutput.c	(revision 5350)
+++ trunk/psphot/src/psphotOutput.c	(revision 5617)
@@ -348,9 +348,8 @@
 
 // write the peaks to an output file
-bool pmPeaksWriteText (psArray *sources, char *filename) {
+bool pmPeaksWriteText (psArray *peaks, char *filename) {
 
     int i;
     FILE *f;
-    pmPeak *peak;
 	
     f = fopen (filename, "w");
@@ -360,6 +359,6 @@
     }
 
-    for (i = 0; i < sources->n; i++) {
-	peak = (pmPeak *) sources->data[i];
+    for (i = 0; i < peaks->n; i++) {
+	pmPeak *peak = peaks->data[i];
 	if (peak == NULL) continue;
 	fprintf (f, "%5d %5d  %7.1f\n", 
