X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fattributes.c;h=f516dc61a172f72afb792f27026a109447b5c903;hb=76c790067446eb993f615813069936887fbb4fc8;hp=c4ae97c285928ed6e701cc6594fe0fefed5824c7;hpb=d4988f76544bdb8c94d6e73756b4317d09c1dc07;p=pspp diff --git a/src/data/attributes.c b/src/data/attributes.c index c4ae97c285..f516dc61a1 100644 --- a/src/data/attributes.c +++ b/src/data/attributes.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2008, 2009, 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2011, 2012, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -220,14 +220,14 @@ attrset_count (const struct attrset *set) case-insensitively, or a null pointer if SET does not contain an attribute with that name. */ struct attribute * -attrset_lookup (struct attrset *set, const char *name) +attrset_lookup (const struct attrset *set, const char *name) { - struct attribute *attr; + const struct attribute *attr; HMAP_FOR_EACH_WITH_HASH (attr, struct attribute, node, utf8_hash_case_string (name, 0), &set->map) if (!utf8_strcasecmp (attribute_get_name (attr), name)) break; - return attr; + return CONST_CAST (struct attribute *, attr); } /* Adds ATTR to SET, which must not already contain an attribute