aboutsummaryrefslogtreecommitdiff
path: root/mail/emil/files/patch-main.c
blob: f7e0667cc0c2b60fa43e09fda723c50b164dfd19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- main.c.orig	1996-06-04 15:36:58.000000000 +0200
+++ main.c	2011-07-25 20:32:45.000000000 +0200
@@ -69,7 +69,7 @@ int	spawn_mailer	= 0;
 int     pseudo_route    = 0;
 
 int	in_fd		= 0;
-FILE	* out_fd	= stdout;
+FILE	* out_fd	= NULL;
 FILE	* char_fd	= NULL;
 FILE	* conf_fd	= NULL;
 off_t   pz;
@@ -84,6 +84,8 @@ int	main(int argc, char *argv[])
   char *cmailer = NULL;
   char *member = NULL;
 
+  out_fd	= stdout;
+
 #ifdef	HAVE_GETPAGESIZE
 	pz = (off_t) getpagesize();
 #elif	defined(hpux) || defined(_AUX_SOURCE)
@@ -177,7 +179,7 @@ int	main(int argc, char *argv[])
 			sprintf(ebuf,"Invalid parameter to -f: %s",optarg);
 #ifdef DEBUG
 		  if (edebug)
-		    fprintf(stderr, ebuf);
+		    fprintf(stderr, "%s", ebuf);
 #endif
 			logger(LOG_WARNING,ebuf);
 		}
@@ -303,7 +305,7 @@ int	main(int argc, char *argv[])
 		sprintf(ebuf,"Invalid flag: -%c",c);
 #ifdef DEBUG
 			if (edebug)
-			  fprintf(stderr, ebuf);
+			  fprintf(stderr, "%s", ebuf);
 #endif
 		logger(LOG_WARNING,ebuf);
 	}
@@ -359,7 +361,7 @@ int	main(int argc, char *argv[])
 	sprintf(ebuf, "Invalid mailer specification %s", optarg);
 #ifdef DEBUG
 	if (edebug)
-	  fprintf(stderr, ebuf);
+	  fprintf(stderr, "%s", ebuf);
 #endif
 	logger(LOG_ERR, ebuf);
 	fprintf(stderr, "Emil: %s\n", ebuf);
@@ -448,7 +450,7 @@ int	main(int argc, char *argv[])
 		);
 #ifdef DEBUG
       if (edebug)
-	fprintf(stderr, ebuf);
+	fprintf(stderr, "%s", ebuf);
 #endif
   logger(LOG_DEBUG,ebuf);
   if (source == NULL)