diff --git a/ChangeLog b/ChangeLog index 930501649..f61c2a04b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-07-11 Robert Larice + * src/xspice/icm/analog/oneshot/cfunc.mod , + * src/xspice/icm/analog/pwl/cfunc.mod , + * src/xspice/icm/analog/sine/cfunc.mod , + * src/xspice/icm/analog/square/cfunc.mod , + * src/xspice/icm/analog/triangle/cfunc.mod , + * src/xspice/icm/digital/d_osc/cfunc.mod , + * src/xspice/icm/xtradev/core/cfunc.mod : + dont compare with '\0' when NULL was meant + 2010-07-11 Robert Larice * src/spicelib/devices/vccs/vccsask.c , * src/spicelib/devices/vccs/vccsdel.c , diff --git a/src/xspice/icm/analog/oneshot/cfunc.mod b/src/xspice/icm/analog/oneshot/cfunc.mod index d500f8530..5172982e3 100644 --- a/src/xspice/icm/analog/oneshot/cfunc.mod +++ b/src/xspice/icm/analog/oneshot/cfunc.mod @@ -316,13 +316,13 @@ if((PORT_NULL(clear) != 1) && (INPUT(clear) > trig_clk)){ /* Allocate storage for breakpoint domain & freq. range values */ x = (double *) calloc(cntl_size, sizeof(double)); - if (x == '\0') { + if (!x) { cm_message_send(oneshot_allocation_error); return; } y = (double *) calloc(pw_size, sizeof(double)); - if (y == '\0') { + if (!y) { cm_message_send(oneshot_allocation_error); return; } diff --git a/src/xspice/icm/analog/pwl/cfunc.mod b/src/xspice/icm/analog/pwl/cfunc.mod index 1d0b53e42..0e6b57868 100644 --- a/src/xspice/icm/analog/pwl/cfunc.mod +++ b/src/xspice/icm/analog/pwl/cfunc.mod @@ -272,13 +272,13 @@ void cm_pwl(ARGS) /* structure holding parms, /* Allocate storage for breakpoint domain & range values */ STATIC_VAR(x) = (double *) calloc(size, sizeof(double)); x = STATIC_VAR(x); - if (x == '\0') { + if (!x) { cm_message_send(allocation_error); } STATIC_VAR(y) = (double *) calloc(size, sizeof(double)); y = STATIC_VAR(y); - if (y == '\0') { + if (!y) { cm_message_send(allocation_error); } diff --git a/src/xspice/icm/analog/sine/cfunc.mod b/src/xspice/icm/analog/sine/cfunc.mod index 15c86ec7f..d96c85433 100644 --- a/src/xspice/icm/analog/sine/cfunc.mod +++ b/src/xspice/icm/analog/sine/cfunc.mod @@ -179,12 +179,12 @@ void cm_sine(ARGS) /* structure holding parms, /* Allocate storage for breakpoint domain & freq. range values */ x = (double *) calloc(cntl_size, sizeof(double)); - if (x == '\0') { + if (!x) { cm_message_send(allocation_error); return; } y = (double *) calloc(freq_size, sizeof(double)); - if (y == '\0') { + if (!y) { cm_message_send(allocation_error); return; } diff --git a/src/xspice/icm/analog/square/cfunc.mod b/src/xspice/icm/analog/square/cfunc.mod index c1e40285e..6bba565e8 100644 --- a/src/xspice/icm/analog/square/cfunc.mod +++ b/src/xspice/icm/analog/square/cfunc.mod @@ -245,13 +245,13 @@ void cm_square(ARGS) /* structure holding parms, /* Allocate storage for breakpoint domain & freq. range values */ x = (double *) calloc(cntl_size, sizeof(double)); - if (x == '\0') { + if (!x) { cm_message_send(square_allocation_error); return; } y = (double *) calloc(freq_size, sizeof(double)); - if (y == '\0') { + if (!y) { cm_message_send(square_allocation_error); return; } diff --git a/src/xspice/icm/analog/triangle/cfunc.mod b/src/xspice/icm/analog/triangle/cfunc.mod index 9a8b86dec..c03beb168 100644 --- a/src/xspice/icm/analog/triangle/cfunc.mod +++ b/src/xspice/icm/analog/triangle/cfunc.mod @@ -234,13 +234,13 @@ void cm_triangle(ARGS) /* structure holding parms, /* Allocate storage for breakpoint domain & freq. range values */ x = (double *) calloc(cntl_size, sizeof(double)); - if (x == '\0') { + if (!x) { cm_message_send(triangle_allocation_error); return; } y = (double *) calloc(freq_size, sizeof(double)); - if (y == '\0') { + if (!y) { cm_message_send(triangle_allocation_error); return; } diff --git a/src/xspice/icm/digital/d_osc/cfunc.mod b/src/xspice/icm/digital/d_osc/cfunc.mod index fb102e483..3321a3437 100644 --- a/src/xspice/icm/digital/d_osc/cfunc.mod +++ b/src/xspice/icm/digital/d_osc/cfunc.mod @@ -280,13 +280,13 @@ void cm_d_osc(ARGS) /* Allocate storage for breakpoint domain & freq. range values */ x = (double *) calloc(cntl_size, sizeof(double)); - if (x == '\0') { + if (!x) { cm_message_send(d_osc_allocation_error); return; } y = (double *) calloc(freq_size, sizeof(double)); - if (y == '\0') { + if (!y) { cm_message_send(d_osc_allocation_error); return; } diff --git a/src/xspice/icm/xtradev/core/cfunc.mod b/src/xspice/icm/xtradev/core/cfunc.mod index 28b5db52d..3abdf7900 100644 --- a/src/xspice/icm/xtradev/core/cfunc.mod +++ b/src/xspice/icm/xtradev/core/cfunc.mod @@ -274,12 +274,12 @@ void cm_core(ARGS) /* structure holding parms, /* Allocate storage for breakpoint domain & range values */ H = (double *) calloc(size, sizeof(double)); - if (H == '\0') { + if (!H) { cm_message_send(allocation_error); return; } B = (double *) calloc(size, sizeof(double)); - if (B == '\0') { + if (!B) { cm_message_send(allocation_error); return; }