dont compare with '\0' when NULL was meant

This commit is contained in:
rlar 2010-07-11 12:33:54 +00:00
parent a23c482c23
commit cc1cdbeeac
8 changed files with 24 additions and 14 deletions

View File

@ -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 ,

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}