File: 0003-Fix-incorrect-calls-to-syslog.patch

package info (click to toggle)
avr-evtd 1.7.7-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 424 kB
  • sloc: ansic: 1,152; sh: 212; makefile: 49
file content (35 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download | duplicates (2)
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
From: =?utf-8?q?Rog=C3=A9rio_Theodoro_de_Brito?= <rbrito@ime.usp.br>
Date: Sun, 27 Sep 2020 18:57:40 -0300
Subject: Fix incorrect calls to syslog.

I should "forward it myself" (as I am still marked as an upstream
maintainer).
---
 avr-evtd.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/avr-evtd.c b/avr-evtd.c
index e8872cd..a560946 100644
--- a/avr-evtd.c
+++ b/avr-evtd.c
@@ -1517,13 +1517,13 @@ static void set_avr_timer(char type)
 		ttime = ltime + wait_time;
 		decode_time = localtime(&ttime);
 
-		sprintf(message,
-			"%s-%02d/%02d %02d:%02d (Following timer %s)",
-			message, decode_time->tm_mon + 1,
-			decode_time->tm_mday, decode_time->tm_hour,
-			decode_time->tm_min, strMessage[(int) type]);
-
-		syslog(LOG_INFO, message);
+		syslog(LOG_INFO, "%s-%02d/%02d %02d:%02d (Following timer %s)",
+		       message,
+		       decode_time->tm_mon + 1,
+		       decode_time->tm_mday,
+		       decode_time->tm_hour,
+		       decode_time->tm_min,
+		       strMessage[(int) type]);
 
 		/* Now tell the AVR we are updating the 'on' time */
 		writeUART(0x3E);