From d3f62e237096e79c215cb728e8105e82c4e6e7dd Mon Sep 17 00:00:00 2001 From: Dinh Cong Toan Date: Wed, 26 May 2021 13:29:49 +0700 Subject: Apply uncrustify for src/daemon/* and src/lib/* Apply uncrustify for src/daemon/* and src/lib/* Signed-off-by: KHANH LUONG HONG DUY --- src/lib/dlt_client_cfg.h | 4 +- src/lib/dlt_env_ll.c | 157 +++++++++++++++++++++++++++------------------ src/lib/dlt_filetransfer.c | 143 +++++++++++++++++++++++++---------------- src/lib/dlt_user_cfg.h | 3 +- 4 files changed, 186 insertions(+), 121 deletions(-) (limited to 'src/lib') diff --git a/src/lib/dlt_client_cfg.h b/src/lib/dlt_client_cfg.h index aa67525..104823e 100644 --- a/src/lib/dlt_client_cfg.h +++ b/src/lib/dlt_client_cfg.h @@ -82,9 +82,9 @@ /* Initial baudrate */ #if !defined (__WIN32__) && !defined(_MSC_VER) -# define DLT_CLIENT_INITIAL_BAUDRATE B115200 +#define DLT_CLIENT_INITIAL_BAUDRATE B115200 #else -# define DLT_CLIENT_INITIAL_BAUDRATE 0 +#define DLT_CLIENT_INITIAL_BAUDRATE 0 #endif /* Name of environment variable for specifying the daemon port */ diff --git a/src/lib/dlt_env_ll.c b/src/lib/dlt_env_ll.c index 8770a02..3923704 100644 --- a/src/lib/dlt_env_ll.c +++ b/src/lib/dlt_env_ll.c @@ -59,20 +59,24 @@ int dlt_env_extract_id(char **const env, char *id) { int i; - if (!env || !id) + if (!env || !id) { return -1; + } - if (!(*env)) + if (!(*env)) { return -1; + } memset(id, 0, 4); - for (i = 0; (i < 4) && (**env != ':') && (**env != 0); ++i) + for (i = 0; (i < 4) && (**env != ':') && (**env != 0); ++i) { *id++ = *((*env)++); + } /* the next/last character must be ':' */ - if ((0 != **env) && (':' == **env)) + if ((0 != **env) && (':' == **env)) { return 0; + } return -1; } @@ -88,19 +92,22 @@ int dlt_env_helper_to_lower(char **const env, char *result, int const res_len) int count = 0; char ch; - if (!env || !result) + if (!env || !result) { return -1; + } - if (!(*env)) + if (!(*env)) { return -1; + } ch = *(*env); while (ch && (count < res_len - 1) && (ch != ';')) { - if ((ch >= 'A') && (ch <= 'Z')) + if ((ch >= 'A') && (ch <= 'Z')) { result[count] = ch + 'a' - 'A'; - else + } else { result[count] = ch; + } ch = *(++(*env)); ++count; @@ -108,10 +115,11 @@ int dlt_env_helper_to_lower(char **const env, char *result, int const res_len) result[count] = 0; - if (!ch || (ch == ';')) /* full input was parsed */ + if (!ch || (ch == ';')) { /* full input was parsed */ return 0; - else + } else { return -1; + } } @@ -119,38 +127,41 @@ int dlt_env_extract_symbolic_ll(char **const env, int8_t *ll) { char result[strlen("verbose") + 1]; - if (!env || !ll) + if (!env || !ll) { return -1; + } - if (!(*env)) + if (!(*env)) { return -1; + } if (dlt_env_helper_to_lower(env, &result[0], sizeof(result)) == 0) { - if (strncmp("default", result, sizeof(result)) == 0) + if (strncmp("default", result, sizeof(result)) == 0) { *ll = -1; - else if (strncmp("off", result, sizeof(result)) == 0) + } else if (strncmp("off", result, sizeof(result)) == 0) { *ll = 0; - else if (strncmp("fatal", result, sizeof(result)) == 0) + } else if (strncmp("fatal", result, sizeof(result)) == 0) { *ll = 1; - else if (strncmp("error", result, sizeof(result)) == 0) + } else if (strncmp("error", result, sizeof(result)) == 0) { *ll = 2; - else if (strncmp("warning", result, sizeof(result)) == 0) + } else if (strncmp("warning", result, sizeof(result)) == 0) { *ll = 3; - else if (strncmp("info", result, sizeof(result)) == 0) + } else if (strncmp("info", result, sizeof(result)) == 0) { *ll = 4; - else if (strncmp("debug", result, sizeof(result)) == 0) + } else if (strncmp("debug", result, sizeof(result)) == 0) { *ll = 5; - else if (strncmp("verbose", result, sizeof(result)) == 0) + } else if (strncmp("verbose", result, sizeof(result)) == 0) { *ll = 6; - else + } else { return -1; + } - if (**env != 0) + if (**env != 0) { (*env)++; + } return 0; - } - else { + } else { return -1; } } @@ -186,11 +197,13 @@ int dlt_env_extract_symbolic_ll(char **const env, int8_t *ll) */ int dlt_env_extract_ll(char **const env, int8_t *ll) { - if (!env || !ll) + if (!env || !ll) { return -1; + } - if (!(*env)) + if (!(*env)) { return -1; + } /* extract number */ if (**env == '-') { @@ -200,19 +213,19 @@ int dlt_env_extract_ll(char **const env, int8_t *ll) *ll = -1; (*env)++; } - } - else { + } else { if ((**env >= '0') && (**env < '7')) { *ll = **env - '0'; (*env)++; - } - else if (dlt_env_extract_symbolic_ll(env, ll) != 0) + } else if (dlt_env_extract_symbolic_ll(env, ll) != 0) { return -1; + } } /* check end, either next char is NULL or ';' */ - if ((**env == ';') || (**env == 0)) + if ((**env == ';') || (**env == 0)) { return 0; + } return -1; } @@ -227,29 +240,34 @@ int dlt_env_extract_ll_item(char **const env, dlt_env_ll_item *const item) { int ret = -1; - if (!env || !item) + if (!env || !item) { return -1; + } - if (!(*env)) + if (!(*env)) { return -1; + } memset(item, 0, sizeof(dlt_env_ll_item)); ret = dlt_env_extract_id(env, item->appId); - if (ret == -1) + if (ret == -1) { return -1; + } (*env)++; ret = dlt_env_extract_id(env, item->ctxId); - if (ret == -1) + if (ret == -1) { return -1; + } (*env)++; ret = dlt_env_extract_ll(env, &item->ll); - if (ret == -1) + if (ret == -1) { return -1; + } return 0; } @@ -265,8 +283,9 @@ int dlt_env_extract_ll_item(char **const env, dlt_env_ll_item *const item) */ int dlt_env_init_ll_set(dlt_env_ll_set *const ll_set) { - if (!ll_set) + if (!ll_set) { return -1; + } ll_set->array_size = DLT_ENV_LL_SET_INCREASE; ll_set->item = (dlt_env_ll_item *)malloc(sizeof(dlt_env_ll_item) * ll_set->array_size); @@ -287,8 +306,9 @@ int dlt_env_init_ll_set(dlt_env_ll_set *const ll_set) */ void dlt_env_free_ll_set(dlt_env_ll_set *const ll_set) { - if (!ll_set) + if (!ll_set) { return; + } if (ll_set->item != NULL) { free(ll_set->item); @@ -311,8 +331,9 @@ int dlt_env_increase_ll_set(dlt_env_ll_set *const ll_set) dlt_env_ll_item *old_set; size_t old_size; - if (!ll_set) + if (!ll_set) { return -1; + } old_set = ll_set->item; old_size = ll_set->array_size; @@ -324,8 +345,7 @@ int dlt_env_increase_ll_set(dlt_env_ll_set *const ll_set) /* should trigger a warning: no memory left */ ll_set->array_size -= DLT_ENV_LL_SET_INCREASE; return -1; - } - else { + } else { memcpy(ll_set->item, old_set, sizeof(dlt_env_ll_item) * old_size); free(old_set); return 0; @@ -343,26 +363,32 @@ int dlt_env_increase_ll_set(dlt_env_ll_set *const ll_set) */ int dlt_env_extract_ll_set(char **const env, dlt_env_ll_set *const ll_set) { - if (!env || !ll_set) + if (!env || !ll_set) { return -1; + } - if (!(*env)) + if (!(*env)) { return -1; + } - if (dlt_env_init_ll_set(ll_set) == -1) + if (dlt_env_init_ll_set(ll_set) == -1) { return -1; + } do { if (ll_set->num_elem == ll_set->array_size) { - if (dlt_env_increase_ll_set(ll_set) == -1) + if (dlt_env_increase_ll_set(ll_set) == -1) { return -1; + } } - if (dlt_env_extract_ll_item(env, &ll_set->item[ll_set->num_elem++]) == -1) + if (dlt_env_extract_ll_item(env, &ll_set->item[ll_set->num_elem++]) == -1) { return -1; + } - if (**env == ';') + if (**env == ';') { (*env)++; + } } while (**env != 0); return 0; @@ -376,17 +402,21 @@ int dlt_env_extract_ll_set(char **const env, dlt_env_ll_set *const ll_set) */ int dlt_env_ids_match(char const *const a, char const *const b) { - if (a[0] != b[0]) + if (a[0] != b[0]) { return 0; + } - if (a[1] != b[1]) + if (a[1] != b[1]) { return 0; + } - if (a[2] != b[2]) + if (a[2] != b[2]) { return 0; + } - if (a[3] != b[3]) + if (a[3] != b[3]) { return 0; + } return 1; } @@ -403,23 +433,26 @@ int dlt_env_ids_match(char const *const a, char const *const b) * * In case of error, -1 is returned. */ -int dlt_env_ll_item_get_matching_prio(dlt_env_ll_item const *const item, char const *const apid, char const *const ctid) +int dlt_env_ll_item_get_matching_prio(dlt_env_ll_item const *const item, + char const *const apid, + char const *const ctid) { - if ((!item) || (!apid) || (!ctid)) + if ((!item) || (!apid) || (!ctid)) { return -1; + } if (item->appId[0] == 0) { if (item->ctxId[0] == 0) { return 1; - } - else if (dlt_env_ids_match(item->ctxId, ctid)) + } else if (dlt_env_ids_match(item->ctxId, ctid)) { return 2; - } - else if (dlt_env_ids_match(item->appId, apid)) { - if (item->ctxId[0] == 0) + } + } else if (dlt_env_ids_match(item->appId, apid)) { + if (item->ctxId[0] == 0) { return 3; - else if (dlt_env_ids_match(item->ctxId, ctid)) + } else if (dlt_env_ids_match(item->ctxId, ctid)) { return 4; + } } return 0; @@ -440,8 +473,9 @@ int dlt_env_adjust_ll_from_env(dlt_env_ll_set const *const ll_set, char const *const ctid, int const ll) { - if ((!ll_set) || (!apid) || (!ctid)) + if ((!ll_set) || (!apid) || (!ctid)) { return ll; + } int res = ll; int prio = 0; /* no match so far */ @@ -454,8 +488,9 @@ int dlt_env_adjust_ll_from_env(dlt_env_ll_set const *const ll_set, prio = p; res = ll_set->item[i].ll; - if (p == 4) /* maximum reached, immediate return */ + if (p == 4) { /* maximum reached, immediate return */ return res; + } } } diff --git a/src/lib/dlt_filetransfer.c b/src/lib/dlt_filetransfer.c index bd196ea..7508790 100644 --- a/src/lib/dlt_filetransfer.c +++ b/src/lib/dlt_filetransfer.c @@ -101,18 +101,21 @@ uint32_t getFilesize(const char *file, int *ok) */ void stringHash(const char *str, uint32_t *hash) { - if (!str || !hash) + if (!str || !hash) { return; + } unsigned int len = strlen(str); unsigned int i = 0; - if (len <= 0) + if (len <= 0) { return; + } - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { *hash = 53 * *hash + str[i]; + } } @@ -130,8 +133,7 @@ uint32_t getFileSerialNumber(const char *file, int *ok) if (-1 == stat(file, &st)) { *ok = 0; ret = 0; - } - else { + } else { *ok = 1; ret = st.st_ino; ret = ret << (sizeof(ret) * 8) / 2; @@ -217,8 +219,9 @@ int checkUserBufferForFreeSpace() dlt_user_check_buffer(&total_size, &used_size); - if ((total_size - used_size) < (total_size / 2)) + if ((total_size - used_size) < (total_size / 2)) { return -1; + } return 1; } @@ -240,27 +243,30 @@ void dlt_user_log_file_errorMessage(DltContext *fileContext, const char *filenam int ok = 0; uint32_t fserial = getFileSerialNumber(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_errorMessage, error in getFileSerialNumber for: "), DLT_STRING(filename)); + } uint32_t fsize = getFilesize(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_errorMessage, error in getFilesize for: "), DLT_STRING(filename)); + } char fcreationdate[50]; getFileCreationDate2(filename, &ok, fcreationdate); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_errorMessage, error in getFilesize for: "), DLT_STRING(filename)); + } int package_count = dlt_user_log_file_packagesCount(fileContext, filename); @@ -276,8 +282,7 @@ void dlt_user_log_file_errorMessage(DltContext *fileContext, const char *filenam DLT_UINT(BUFFER_SIZE), DLT_STRING("FLER") ); - } - else { + } else { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("FLER"), DLT_INT(errorCode), @@ -304,28 +309,31 @@ int dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename) uint32_t fsize = getFilesize(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_infoAbout, Error getting size of file:"), DLT_STRING(filename)); + } uint32_t fserialnumber = getFileSerialNumber(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_infoAbout, Error getting serial number of file:"), DLT_STRING(filename)); + } char creationdate[50]; getFileCreationDate2(filename, &ok, creationdate); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_infoAbout, Error getting creation date of file:"), DLT_STRING(filename)); + } DLT_LOG(*fileContext, DLT_LOG_INFO, DLT_STRING("FLIF"), @@ -333,12 +341,12 @@ int dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename) DLT_STRING("filename"), DLT_STRING(filename), DLT_STRING("file size in bytes"), DLT_UINT(fsize), DLT_STRING("file creation date"), DLT_STRING(creationdate), - DLT_STRING("number of packages"), DLT_UINT(dlt_user_log_file_packagesCount(fileContext, filename)), + DLT_STRING("number of packages"), + DLT_UINT(dlt_user_log_file_packagesCount(fileContext, filename)), DLT_STRING("FLIF") ); return 0; - } - else { + } else { dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_INFO_ABOUT); return DLT_FILETRANSFER_ERROR_INFO_ABOUT; } @@ -356,21 +364,28 @@ int dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename) * @param timeout Timeout in ms to wait between some logs. Important that the FIFO of dlt will not be flooded with to many messages in a short period of time. * @return Returns 0 if everything was okey. If there was a failure a value < 0 will be returned. */ -int dlt_user_log_file_complete(DltContext *fileContext, const char *filename, int deleteFlag, int timeout) +int dlt_user_log_file_complete(DltContext *fileContext, + const char *filename, + int deleteFlag, + int timeout) { if (!isFile(filename)) { dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_FILE_COMPLETE); return DLT_FILETRANSFER_ERROR_FILE_COMPLETE; } - if (dlt_user_log_file_header(fileContext, filename) != 0) + if (dlt_user_log_file_header(fileContext, filename) != 0) { return DLT_FILETRANSFER_ERROR_FILE_COMPLETE1; + } - if (dlt_user_log_file_data(fileContext, filename, DLT_FILETRANSFER_TRANSFER_ALL_PACKAGES, timeout) != 0) + if (dlt_user_log_file_data(fileContext, filename, DLT_FILETRANSFER_TRANSFER_ALL_PACKAGES, + timeout) != 0) { return DLT_FILETRANSFER_ERROR_FILE_COMPLETE2; + } - if (dlt_user_log_file_end(fileContext, filename, deleteFlag) != 0) + if (dlt_user_log_file_end(fileContext, filename, deleteFlag) != 0) { return DLT_FILETRANSFER_ERROR_FILE_COMPLETE3; + } return 0; } @@ -405,17 +420,16 @@ int dlt_user_log_file_packagesCount(DltContext *fileContext, const char *filenam if (filesize < BUFFER_SIZE) { return packages; - } - else { + } else { packages = filesize / BUFFER_SIZE; - if (filesize % BUFFER_SIZE == 0) + if (filesize % BUFFER_SIZE == 0) { return packages; - else + } else { return packages + 1; + } } - } - else { + } else { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("Error in: dlt_user_log_file_packagesCount, !isFile"), @@ -443,24 +457,31 @@ int dlt_user_log_file_header_alias(DltContext *fileContext, const char *filename uint32_t fserialnumber = getFileSerialNumber(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, - DLT_STRING("dlt_user_log_file_header_alias, Error getting serial number of file:"), + DLT_STRING( + "dlt_user_log_file_header_alias, Error getting serial number of file:"), DLT_STRING(filename)); + } uint32_t fsize = getFilesize(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, - DLT_STRING("dlt_user_log_file_header_alias, Error getting size of file:"), DLT_STRING(filename)); + DLT_STRING( + "dlt_user_log_file_header_alias, Error getting size of file:"), + DLT_STRING(filename)); + } char fcreationdate[50]; getFileCreationDate2(filename, &ok, fcreationdate); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, - DLT_STRING("dlt_user_log_file_header_alias, Error getting creation date of file:"), + DLT_STRING( + "dlt_user_log_file_header_alias, Error getting creation date of file:"), DLT_STRING(filename)); + } DLT_LOG(*fileContext, DLT_LOG_INFO, DLT_STRING("FLST"), @@ -474,8 +495,7 @@ int dlt_user_log_file_header_alias(DltContext *fileContext, const char *filename ); return 0; - } - else { + } else { dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_FILE_HEAD); return DLT_FILETRANSFER_ERROR_FILE_HEAD; } @@ -498,24 +518,31 @@ int dlt_user_log_file_header(DltContext *fileContext, const char *filename) uint32_t fserialnumber = getFileSerialNumber(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, - DLT_STRING("dlt_user_log_file_header, Error getting serial number of file:"), DLT_STRING(filename)); + DLT_STRING( + "dlt_user_log_file_header, Error getting serial number of file:"), + DLT_STRING(filename)); + } uint32_t fsize = getFilesize(filename, &ok); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("dlt_user_log_file_header, Error getting size of file:"), DLT_STRING(filename)); + } char fcreationdate[50]; getFileCreationDate2(filename, &ok, fcreationdate); - if (!ok) + if (!ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, - DLT_STRING("dlt_user_log_file_header, Error getting creation date of file:"), DLT_STRING(filename)); + DLT_STRING( + "dlt_user_log_file_header, Error getting creation date of file:"), + DLT_STRING(filename)); + } DLT_LOG(*fileContext, DLT_LOG_INFO, DLT_STRING("FLST"), @@ -529,8 +556,7 @@ int dlt_user_log_file_header(DltContext *fileContext, const char *filename) ); return 0; - } - else { + } else { dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_FILE_HEAD); return DLT_FILETRANSFER_ERROR_FILE_HEAD; } @@ -544,7 +570,10 @@ int dlt_user_log_file_header(DltContext *fileContext, const char *filename) * @param timeout Timeout to wait between dlt logs. Important because the dlt FIFO should not be flooded. Default is defined by MIN_TIMEOUT. The given timeout in ms can not be smaller than MIN_TIMEOUT. * @return Returns 0 if everything was okey. If there was a failure a value < 0 will be returned. */ -int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int packageToTransfer, int timeout) +int dlt_user_log_file_data(DltContext *fileContext, + const char *filename, + int packageToTransfer, + int timeout) { FILE *file; int pkgNumber; @@ -561,7 +590,8 @@ int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int pa if (((packageToTransfer != DLT_FILETRANSFER_TRANSFER_ALL_PACKAGES) && (packageToTransfer > - dlt_user_log_file_packagesCount(fileContext, filename))) || (packageToTransfer <= 0)) { + dlt_user_log_file_packagesCount(fileContext, + filename))) || (packageToTransfer <= 0)) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("Error at dlt_user_log_file_data: packageToTransfer out of scope"), DLT_STRING("packageToTransfer:"), @@ -592,7 +622,6 @@ int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int pa fclose (file); return -1; - } readBytes = fread(buffer, sizeof(char), BUFFER_SIZE, file); @@ -600,10 +629,11 @@ int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int pa uint32_t fserial = getFileSerialNumber(filename, &ok); - if (1 != ok) + if (1 != ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("failed to get FileSerialNumber for: "), DLT_STRING(filename)); + } DLT_LOG(*fileContext, DLT_LOG_INFO, DLT_STRING("FLDA"), @@ -614,9 +644,7 @@ int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int pa ); doTimeout(timeout); - - } - else { + } else { pkgNumber = 0; while (!feof(file)) { @@ -629,10 +657,11 @@ int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int pa uint32_t fserial = getFileSerialNumber(filename, &ok); - if (1 != ok) + if (1 != ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("failed to get FileSerialNumber for: "), DLT_STRING(filename)); + } DLT_LOG(*fileContext, DLT_LOG_INFO, DLT_STRING("FLDA"), @@ -650,9 +679,7 @@ int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int pa fclose(file); return 0; - - } - else { + } else { dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_FILE_DATA); return DLT_FILETRANSFER_ERROR_FILE_DATA; } @@ -674,10 +701,11 @@ int dlt_user_log_file_end(DltContext *fileContext, const char *filename, int del int ok; uint32_t fserial = getFileSerialNumber(filename, &ok); - if (1 != ok) + if (1 != ok) { DLT_LOG(*fileContext, DLT_LOG_ERROR, DLT_STRING("failed to get FileSerialNumber for: "), DLT_STRING(filename)); + } DLT_LOG(*fileContext, DLT_LOG_INFO, DLT_STRING("FLFI"), @@ -687,14 +715,15 @@ int dlt_user_log_file_end(DltContext *fileContext, const char *filename, int del if (deleteFlag) { if (doRemoveFile(filename) != 0) { - dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_FILE_END); + dlt_user_log_file_errorMessage(fileContext, + filename, + DLT_FILETRANSFER_ERROR_FILE_END); return -1; } } return 0; - } - else { + } else { dlt_user_log_file_errorMessage(fileContext, filename, DLT_FILETRANSFER_ERROR_FILE_END); return DLT_FILETRANSFER_ERROR_FILE_END; } diff --git a/src/lib/dlt_user_cfg.h b/src/lib/dlt_user_cfg.h index d394daa..8037c28 100644 --- a/src/lib/dlt_user_cfg.h +++ b/src/lib/dlt_user_cfg.h @@ -139,7 +139,8 @@ #define DLT_USER_ATEXIT_RESEND_BUFFER_SLEEP 100000000 /* Name of environment variable to disable extended header in non verbose mode */ -#define DLT_USER_ENV_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE "DLT_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE" +#define DLT_USER_ENV_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE \ + "DLT_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE" typedef enum { -- cgit v1.2.1