diff options
author | Saya Sugiura <ssugiura@jp.adit-jv.com> | 2019-02-08 16:51:34 +0900 |
---|---|---|
committer | Saya Sugiura <ssugiura@jp.adit-jv.com> | 2019-06-18 17:22:09 +0900 |
commit | 19098107703b211e93122b3fea8035355c021c23 (patch) | |
tree | 7427cefe3b7b4ec7ab3d0e435351ddc21df9aa94 /src/lib | |
parent | eee8159546a8805ca5912d9572c165bfb3954c00 (diff) | |
download | DLT-daemon-19098107703b211e93122b3fea8035355c021c23.tar.gz |
libdlt: compare dlt_ll_ts to NULL
This commit fixes dlt_user.dlt_ll_ts to compare to NULL instead of 0.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dlt_user.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index 657df44..13ac2eb 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -1086,10 +1086,10 @@ DltReturnValue dlt_register_context_ll_ts_llccb(DltContext *handle, /* Double registration is already checked by daemon */ /* Allocate or expand context array */ - if (dlt_user.dlt_ll_ts == 0) { + if (dlt_user.dlt_ll_ts == NULL) { dlt_user.dlt_ll_ts = (dlt_ll_ts_type *)malloc(sizeof(dlt_ll_ts_type) * DLT_USER_CONTEXT_ALLOC_SIZE); - if (dlt_user.dlt_ll_ts == 0) { + if (dlt_user.dlt_ll_ts == NULL) { DLT_SEM_FREE(); return DLT_RETURN_ERROR; } @@ -1129,7 +1129,7 @@ DltReturnValue dlt_register_context_ll_ts_llccb(DltContext *handle, dlt_user.dlt_ll_ts = (dlt_ll_ts_type *)malloc(sizeof(dlt_ll_ts_type) * dlt_user.dlt_ll_ts_max_num_entries); - if (dlt_user.dlt_ll_ts == 0) { + if (dlt_user.dlt_ll_ts == NULL) { dlt_user.dlt_ll_ts = old_ll_ts; dlt_user.dlt_ll_ts_max_num_entries = old_max_entries; DLT_SEM_FREE(); @@ -3127,7 +3127,7 @@ DltReturnValue dlt_user_trace_network_truncated(DltContext *handle, return DLT_RETURN_WRONG_PARAMETER; } - if (dlt_user.dlt_ll_ts == 0) + if (dlt_user.dlt_ll_ts == NULL) return DLT_RETURN_ERROR; if (handle->trace_status_ptr && (*(handle->trace_status_ptr) == DLT_TRACE_STATUS_ON)) { |