*
*/
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
struct graph *g = i->parent;
struct graph_value *x;
- x = malloc(sizeof(*x));
- memset(x, 0, sizeof(*x));
+ x = calloc(1, sizeof(*x));
INIT_FLIST_HEAD(&x->alias);
INIT_FLIST_HEAD(&x->list);
flist_add_tail(&x->list, &i->value_list);
ydiff = fabs(yval - y);
/*
- * zero delta, or within or match critera, break
+ * zero delta, or within or match criteria, break
*/
if (ydiff < best_delta) {
best_delta = ydiff;