X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fvalue-labels.c;h=0fe829cebe1781c4ccc2d791756d534b88153e0c;hb=dfc7fb690935c5ef3a3f3c927d8a82b21085fdfc;hp=34223955cafa81aecd4fda8e86102f0f74d7120f;hpb=c9ebc9aa00308b7bb8e5e1601dc8cac6cb94b2f0;p=pspp diff --git a/src/data/value-labels.c b/src/data/value-labels.c index 34223955ca..0fe829cebe 100644 --- a/src/data/value-labels.c +++ b/src/data/value-labels.c @@ -170,8 +170,7 @@ void val_labs_replace (struct val_labs *vls, const union value *value, const char *label) { - struct val_lab *vl = CONST_CAST (struct val_lab *, - val_labs_lookup (vls, value)); + struct val_lab *vl = val_labs_lookup (vls, value); if (vl != NULL) { atom_destroy (vl->label); @@ -183,9 +182,8 @@ val_labs_replace (struct val_labs *vls, const union value *value, /* Removes LABEL from VLS. */ void -val_labs_remove (struct val_labs *vls, const struct val_lab *label_) +val_labs_remove (struct val_labs *vls, struct val_lab *label) { - struct val_lab *label = CONST_CAST (struct val_lab *, label_); hmap_delete (&vls->labels, &label->node); value_destroy (&label->value, vls->width); atom_destroy (label->label); @@ -205,7 +203,7 @@ val_labs_find (const struct val_labs *vls, const union value *value) /* Searches VLS for a value label for VALUE. If successful, returns the value label; otherwise, returns a null pointer. Returns a null pointer if VLS is null. */ -const struct val_lab * +struct val_lab * val_labs_lookup (const struct val_labs *vls, const union value *value) { if (vls != NULL)