projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use lex_error_expecting() in more places.
[pspp]
/
src
/
math
/
levene.c
diff --git
a/src/math/levene.c
b/src/math/levene.c
index 0175ceb70dae6c33f1ea1d64d7f0252b3295d8e0..a005c9436091ecd58b992b936be5e74312a405bd 100644
(file)
--- a/
src/math/levene.c
+++ b/
src/math/levene.c
@@
-93,10
+93,10
@@
cutpoint_cmp (const struct levene *nl, const union value *val0, const union valu
int y = value_compare_3way (val1, nl->cutpoint, nl->gvw);
int y = value_compare_3way (val1, nl->cutpoint, nl->gvw);
- if (
x == 0) x = 1;
- if (
y == 0) y = 1;
+ if (x == 0) x = 1;
+ if (y == 0) y = 1;
- return (
x == y);
+ return (x == y);
}
}
@@
-110,7
+110,6
@@
find_group (const struct levene *nl, const union value *target)
{
if (nl->cmp (nl, &l->group, target))
break;
{
if (nl->cmp (nl, &l->group, target))
break;
- l = NULL;
}
return l;
}
}
return l;
}
@@
-119,7
+118,7
@@
find_group (const struct levene *nl, const union value *target)
struct levene *
levene_create (int indep_width, const union value *cutpoint)
{
struct levene *
levene_create (int indep_width, const union value *cutpoint)
{
- struct levene *nl =
xzalloc (sizeof *nl
);
+ struct levene *nl =
XZALLOC (struct levene
);
hmap_init (&nl->hmap);
hmap_init (&nl->hmap);
@@
-139,15
+138,15
@@
levene_pass_one (struct levene *nl, double value, double weight, const union val
{
struct lev *lev = find_group (nl, gv);
{
struct lev *lev = find_group (nl, gv);
- if (
nl->pass == 0
)
+ if (
nl->pass == 0
)
{
nl->pass = 1;
}
assert (nl->pass == 1);
{
nl->pass = 1;
}
assert (nl->pass == 1);
- if (
NULL == lev)
+ if (NULL == lev)
{
{
- struct lev *l =
xzalloc (sizeof *l
);
+ struct lev *l =
XZALLOC (struct lev
);
value_clone (&l->group, gv, nl->gvw);
hmap_insert (&nl->hmap, &l->node, nl->hash (nl, &l->group));
lev = l;
value_clone (&l->group, gv, nl->gvw);
hmap_insert (&nl->hmap, &l->node, nl->hash (nl, &l->group));
lev = l;
@@
-165,7
+164,7
@@
levene_pass_two (struct levene *nl, double value, double weight, const union val
{
struct lev *lev = NULL;
{
struct lev *lev = NULL;
- if (
nl->pass == 1
)
+ if (
nl->pass == 1
)
{
struct lev *next;
struct lev *l;
{
struct lev *next;
struct lev *l;
@@
-192,7
+191,7
@@
levene_pass_three (struct levene *nl, double value, double weight, const union v
double z;
struct lev *lev = NULL;
double z;
struct lev *lev = NULL;
- if (
nl->pass == 2
)
+ if (
nl->pass == 2
)
{
struct lev *next;
struct lev *l;
{
struct lev *next;
struct lev *l;
@@
-232,7
+231,7
@@
levene_calculate (struct levene *nl)
*/
assert (nl->pass == 0 || nl->pass == 3);
*/
assert (nl->pass == 0 || nl->pass == 3);
- if (
nl->pass == 0
)
+ if (
nl->pass == 0
)
return SYSMIS;
nl->denominator *= hmap_count (&nl->hmap) - 1;
return SYSMIS;
nl->denominator *= hmap_count (&nl->hmap) - 1;