summaryrefslogtreecommitdiff
path: root/src/offlinelogstorage
diff options
context:
space:
mode:
authorManikandan C <mchockalingam@de.adit-jv.com>2018-12-19 16:10:41 +0100
committerChristoph Lipka <clipka@users.noreply.github.com>2018-12-21 10:16:46 +0100
commitab105d1671789fc9bd649f7e9ce3e6af22d30f0e (patch)
tree1cb0a74e08cad0723cd3c601f0fa1842be9d96f2 /src/offlinelogstorage
parentd34dc8fd10ff4dec56d5a221443f91fc26d10d11 (diff)
downloadDLT-daemon-ab105d1671789fc9bd649f7e9ce3e6af22d30f0e.tar.gz
Cleanup of unit test fixes
Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
Diffstat (limited to 'src/offlinelogstorage')
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage.c3
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage_behavior.c5
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage_behavior_internal.h11
3 files changed, 10 insertions, 9 deletions
diff --git a/src/offlinelogstorage/dlt_offline_logstorage.c b/src/offlinelogstorage/dlt_offline_logstorage.c
index c85af6e..42fcfcb 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage.c
+++ b/src/offlinelogstorage/dlt_offline_logstorage.c
@@ -198,6 +198,7 @@ DLT_STATIC int dlt_logstorage_list_add(char *key,
{
free(tmp->key);
free(tmp);
+ tmp->key = NULL;
tmp = NULL;
return -1;
}
@@ -207,6 +208,8 @@ DLT_STATIC int dlt_logstorage_list_add(char *key,
free(tmp->key);
free(tmp->data);
free(tmp);
+ tmp->key = NULL;
+ tmp->data = NULL;
tmp = NULL;
return -1;
}
diff --git a/src/offlinelogstorage/dlt_offline_logstorage_behavior.c b/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
index cc31ff5..46f0f9e 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
+++ b/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
@@ -205,9 +205,8 @@ void dlt_logstorage_rearrange_file_name(DltLogStorageFileList **head)
* @param file_config User configurations for log file
* @return index on success, -1 if no index is found
*/
-unsigned int dlt_logstorage_get_idx_of_log_file(
- DltLogStorageUserConfig *file_config,
- char *file)
+unsigned int dlt_logstorage_get_idx_of_log_file(DltLogStorageUserConfig *file_config,
+ char *file)
{
unsigned int idx = -1;
char *endptr;
diff --git a/src/offlinelogstorage/dlt_offline_logstorage_behavior_internal.h b/src/offlinelogstorage/dlt_offline_logstorage_behavior_internal.h
index b8c80b2..6ddf21e 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage_behavior_internal.h
+++ b/src/offlinelogstorage/dlt_offline_logstorage_behavior_internal.h
@@ -1,6 +1,6 @@
/**
* @licence app begin@
- * Copyright (C) 2017 Advanced Driver Information Technology.
+ * Copyright (C) 2018 Advanced Driver Information Technology.
* This code is developed by Advanced Driver Information Technology.
* Copyright of Advanced Driver Information Technology, Bosch and DENSO.
*
@@ -12,7 +12,7 @@
* this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
- * \author Aditya Paluri <venkataaditya.paluri@in.bosch.com> ADIT 2017
+ * \author Aditya Paluri <venkataaditya.paluri@in.bosch.com> ADIT 2018
*
* \file: dlt_offline_logstorage_behavior_internal.h
* For further information see http://www.genivi.org/.
@@ -21,7 +21,7 @@
/*******************************************************************************
** **
-** SRC-MODULE: dlt_offline_logstorage_behavior_internal.h **
+** SRC-MODULE: dlt_offline_logstorage_behavior_internal.h **
** **
** TARGET : linux **
** **
@@ -60,9 +60,8 @@ void dlt_logstorage_sort_file_name(DltLogStorageFileList **head);
void dlt_logstorage_rearrange_file_name(DltLogStorageFileList **head);
-unsigned int dlt_logstorage_get_idx_of_log_file(
- DltLogStorageUserConfig *file_config,
- char *file);
+unsigned int dlt_logstorage_get_idx_of_log_file(DltLogStorageUserConfig *file_config,
+ char *file);
int dlt_logstorage_storage_dir_info(DltLogStorageUserConfig *file_config,
char *path,