summaryrefslogtreecommitdiff
path: root/src/shared/dlt_protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/dlt_protocol.c')
-rw-r--r--src/shared/dlt_protocol.c18
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];
}