X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fgroup.c;h=f967e451124a2a93c87a1b3080912f27b8eb71ab;hb=f5c108becd49d78f4898cab11352291f5689d24e;hp=105b643a1cf416c6a3eedf17ae08b04cc185d1f5;hpb=7eee0554f378481faf447e2d2e940f389d6b05ec;p=pspp-builds.git diff --git a/src/math/group.c b/src/math/group.c index 105b643a..f967e451 100644 --- a/src/math/group.c +++ b/src/math/group.c @@ -28,11 +28,11 @@ #include -/* Return -1 if the id of a is less than b; +1 if greater than and +/* Return -1 if the id of a is less than b; +1 if greater than and 0 if equal */ -int -compare_group(const struct group_statistics *a, - const struct group_statistics *b, +int +compare_group(const struct group_statistics *a, + const struct group_statistics *b, int width) { return compare_values(&a->id, &b->id, width); @@ -40,7 +40,7 @@ compare_group(const struct group_statistics *a, -unsigned +unsigned hash_group(const struct group_statistics *g, int width) { unsigned id_hash; @@ -51,7 +51,7 @@ hash_group(const struct group_statistics *g, int width) } -void +void free_group(struct group_statistics *v, void *aux UNUSED) { free(v); @@ -63,10 +63,10 @@ group_proc_get (const struct variable *v) { /* This is not ideal, obviously. */ struct group_proc *group = var_get_aux (v); - if (group == NULL) + if (group == NULL) { group = xmalloc (sizeof (struct group_proc)); - var_attach_aux (v, group, var_dtor_free); + var_attach_aux (v, group, var_dtor_free); } return group; }