Commit 447eb872 authored by winckel's avatar winckel
Browse files

Uniformized use of assert.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4739 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 3d4d85a8
......@@ -49,7 +49,6 @@
#include <error.h>
#include <time.h>
#include <unistd.h>
#include <assert.h>
#include "assertions.h"
#include "signals.h"
......@@ -524,13 +523,13 @@ void vcd_signal_dumper_create_header(void)
void vcd_signal_dumper_dump_variable_by_name(vcd_signal_dump_variables variable_name,
unsigned long value)
{
DevCheck((0 <= variable_name) && (variable_name < VCD_SIGNAL_DUMPER_VARIABLES_END),
variable_name, VCD_SIGNAL_DUMPER_VARIABLES_END, 0);
if (ouput_vcd) {
#if defined(ENABLE_VCD_FIFO)
uint32_t write_index = vcd_get_write_index();
assert(variable_name < VCD_SIGNAL_DUMPER_VARIABLES_END);
assert(variable_name >= 0);
vcd_fifo.user_data[write_index].time = vcd_get_time();
vcd_fifo.user_data[write_index].data.variable.variable_name = variable_name;
vcd_fifo.user_data[write_index].data.variable.value = value;
......@@ -538,9 +537,6 @@ void vcd_signal_dumper_dump_variable_by_name(vcd_signal_dump_variables variable_
#else
char binary_string[(sizeof (uint64_t) * BYTE_SIZE) + 1];
assert(variable_name < VCD_SIGNAL_DUMPER_VARIABLES_END);
assert(variable_name >= 0);
if (vcd_fd != NULL)
{
vcd_signal_dumper_print_time_since_start();
......@@ -557,21 +553,18 @@ void vcd_signal_dumper_dump_variable_by_name(vcd_signal_dump_variables variable_
void vcd_signal_dumper_dump_function_by_name(vcd_signal_dump_functions function_name,
vcd_signal_dump_in_out in_out)
{
DevCheck((0 <= function_name) && (function_name < VCD_SIGNAL_DUMPER_FUNCTIONS_END),
function_name, VCD_SIGNAL_DUMPER_FUNCTIONS_END, 0);
if (ouput_vcd) {
#if defined(ENABLE_VCD_FIFO)
uint32_t write_index = vcd_get_write_index();
assert(function_name < VCD_SIGNAL_DUMPER_FUNCTIONS_END);
assert(function_name >= 0);
vcd_fifo.user_data[write_index].time = vcd_get_time();
vcd_fifo.user_data[write_index].data.function.function_name = function_name;
vcd_fifo.user_data[write_index].data.function.in_out = in_out;
vcd_fifo.user_data[write_index].module = VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS; // Set when all other fields are set to validate the user_data
#else
assert(function_name < VCD_SIGNAL_DUMPER_FUNCTIONS_END);
assert(function_name >= 0);
if (vcd_fd != NULL)
{
vcd_signal_dumper_print_time_since_start();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment