diff options
author | Christoph Lipka <clipka@de.adit-jv.com> | 2018-12-20 14:58:19 +0100 |
---|---|---|
committer | Christoph Lipka <clipka@de.adit-jv.com> | 2018-12-21 10:23:41 +0100 |
commit | dca8ab254aa0a687c32009079d85e4d8f960b213 (patch) | |
tree | e63b6a552fd9f61873892110a56a89ef354864cd /src/shared/dlt_protocol.c | |
parent | 0d0c74640c8b792db37cb9f884f89f7561ea551f (diff) | |
download | DLT-daemon-dca8ab254aa0a687c32009079d85e4d8f960b213.tar.gz |
Code beautification using uncrustify
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Diffstat (limited to 'src/shared/dlt_protocol.c')
-rw-r--r-- | src/shared/dlt_protocol.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/shared/dlt_protocol.c b/src/shared/dlt_protocol.c index 78c335f..b893ec4 100644 --- a/src/shared/dlt_protocol.c +++ b/src/shared/dlt_protocol.c @@ -29,8 +29,7 @@ #include "dlt_protocol.h" -const char *const dlt_service_names[] = -{ +const char *const dlt_service_names[] = { "DLT_SERVICE_ID", "DLT_SERVICE_ID_SET_LOG_LEVEL", "DLT_SERVICE_ID_SET_TRACE_STATUS", @@ -53,8 +52,7 @@ const char *const dlt_service_names[] = "DLT_SERVICE_ID_GET_SOFTWARE_VERSION", "DLT_SERVICE_ID_MESSAGE_BUFFER_OVERFLOW" }; -const char *const dlt_user_service_names[] = -{ +const char *const dlt_user_service_names[] = { "DLT_USER_SERVICE_ID", "DLT_SERVICE_ID_UNREGISTER_CONTEXT", "DLT_SERVICE_ID_CONNECTION_INFO", @@ -71,20 +69,12 @@ const char *const dlt_user_service_names[] = const char *dlt_get_service_name(unsigned int id) { if (id == DLT_SERVICE_ID_CALLSW_CINJECTION) - { return "DLT_SERVICE_ID_CALLSW_CINJECTION"; - } else if ((id == DLT_SERVICE_ID) || (id >= DLT_USER_SERVICE_ID_LAST_ENTRY) || - (id >= DLT_SERVICE_ID_LAST_ENTRY && id <= DLT_USER_SERVICE_ID)) - { + ((id >= DLT_SERVICE_ID_LAST_ENTRY) && (id <= DLT_USER_SERVICE_ID))) return "UNDEFINED"; - } else if ((id > DLT_SERVICE_ID) && (id < DLT_SERVICE_ID_LAST_ENTRY)) - { return dlt_service_names[id]; - } else /* user services */ - { - return dlt_user_service_names[id&0xFF]; - } + return dlt_user_service_names[id & 0xFF]; } |