diff options
author | Saya Sugiura <ssugiura@jp.adit-jv.com> | 2019-05-29 17:58:37 +0900 |
---|---|---|
committer | Saya Sugiura <ssugiura@jp.adit-jv.com> | 2019-06-19 11:00:37 +0900 |
commit | 9cf8c10a22542ce784c383d7e371797c4b9910ac (patch) | |
tree | b43fb9e5692e8354dc203fc382c3263d7876ad40 /src/daemon/dlt_daemon_common.c | |
parent | 6088448cdfe3cd152c53136544acc4ee7a508a84 (diff) | |
download | DLT-daemon-9cf8c10a22542ce784c383d7e371797c4b9910ac.tar.gz |
cleanup: Use dlt_vlog()
There were a couple of places which used snprintf-dlt_log. It is
now replaced with dlt_vlog().
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rw-r--r-- | src/daemon/dlt_daemon_common.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index 4a39d64..cb392dc 100644 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -88,7 +88,6 @@ #include "dlt_daemon_socket.h" #include "dlt_daemon_serial.h" -static char str[DLT_DAEMON_COMMON_TEXTBUFSIZE]; char *app_recv_buffer = NULL; /* pointer to receiver buffer for application msges */ sem_t dlt_daemon_mutex; @@ -240,13 +239,8 @@ int dlt_daemon_init(DltDaemon *daemon, dlt_set_id(daemon->ecuid, ""); /* initialize ring buffer for client connection */ - snprintf(str, - DLT_DAEMON_COMMON_TEXTBUFSIZE, - "Ringbuffer configuration: %lu/%lu/%lu\n", - RingbufferMinSize, - RingbufferMaxSize, - RingbufferStepSize); - dlt_log(LOG_INFO, str); + dlt_vlog(LOG_INFO, "Ringbuffer configuration: %lu/%lu/%lu\n", + RingbufferMinSize, RingbufferMaxSize, RingbufferStepSize); if (dlt_buffer_init_dynamic(&(daemon->client_ringbuffer), RingbufferMinSize, RingbufferMaxSize, RingbufferStepSize) == DLT_RETURN_ERROR) @@ -1312,12 +1306,12 @@ int dlt_daemon_configuration_load(DltDaemon *daemon, const char *filename, int v /* parse arguments here */ if (strcmp(token, "LoggingMode") == 0) { daemon->mode = atoi(value); - snprintf(str, DLT_DAEMON_COMMON_TEXTBUFSIZE, "Runtime Option: %s=%d\n", token, daemon->mode); - dlt_log(LOG_INFO, str); + dlt_vlog(LOG_INFO, "Runtime Option: %s=%d\n", token, + daemon->mode); } else { - snprintf(str, DLT_DAEMON_COMMON_TEXTBUFSIZE, "Unknown option: %s=%s\n", token, value); - dlt_log(LOG_WARNING, str); + dlt_vlog(LOG_WARNING, "Unknown option: %s=%s\n", token, + value); } } } |