File: 11-upstream-use-fputs-fputc.patch

package info (click to toggle)
httptunnel 3.3%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 924 kB
  • ctags: 457
  • sloc: ansic: 4,707; sh: 330; makefile: 26
file content (35 lines) | stat: -rw-r--r-- 952 bytes parent folder | download
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
Description: Use fputs and fputc instead of fprintf
Origin: upstream
Forwarded: not-needed

--- httptunnel-3.3+dfsg.orig/ChangeLog
+++ httptunnel-3.3+dfsg/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-10  lars brinkhoff  <lars@nocrew.org>
+
+	* common.c (log_level): Where possible, use fputs and fputc
+	instead of fprintf.
+
 2001-03-30  lars brinkhoff  <lars@nocrew.org>
 
 	From Tim Phipps <Tim.Phipps@st.com>:
--- httptunnel-3.3+dfsg.orig/common.c
+++ httptunnel-3.3+dfsg/common.c
@@ -38,11 +38,14 @@ log_level (int level, char *fmt0, va_lis
       time (&t);
       t2 = localtime (&t);
       strftime (s, sizeof s, "%Y%m%d %H%M%S ", t2);
-      fprintf (debug_file, "%s", s);
+      fputs (s, debug_file);
+
       for (i = 1; i < level; i++)
-	fprintf (debug_file, "    ");
+	fputs ("    ", debug_file);
+
       vfprintf (debug_file, fmt0, ap);
-      fprintf (debug_file, "\n");
+      fputc ('\n', debug_file);
+
       fflush (debug_file);
     }
 }