Lines Matching refs:pair
57 struct pair {
60 struct pair *next;
64 struct pair *pairs;
98 struct pair *pair = space->pairs;
99 struct pair *next = pair;
102 pair = next;
103 next = pair->next;
104 free(pair->value);
105 free(pair->key);
106 free(pair);
138 static struct pair *value_find(struct space *space, const char *key)
140 struct pair *pair = space->pairs;
142 while (pair && strcmp(pair->key, key) != 0)
143 pair = pair->next;
144 return pair;
149 struct pair *pair;
151 pair = value_find(space, key);
152 if (pair) {
153 free(pair->value);
154 pair->value = strdup(value);
155 if (pair->value == NULL)
158 pair = malloc(sizeof(struct pair));
159 if (pair == NULL)
161 pair->key = strdup(key);
162 if (pair->key == NULL) {
163 free(pair);
166 pair->value = strdup(value);
167 if (pair->value == NULL) {
168 free(pair->key);
169 free(pair);
172 pair->next = space->pairs;
173 space->pairs = pair;
1009 struct pair *pair;
1157 pair = value_find(space, "sysfs_device");
1158 if (pair == NULL)
1160 value = sysfs_attr_get_value(pair->value, attr);
1200 pair = value_find(space, attr);
1201 if (pair == NULL)
1203 strlcat(string, pair->value, maxsize);
1292 struct pair *pair;
1438 pair = value_find(space, "sysfs_device");
1439 if (pair == NULL)
1441 dbg("sysfs_attr: '%s' '%s'", pair->value, attr);
1442 temp = sysfs_attr_get_value(pair->value, attr);
1639 pair = value_find(space, attr);
1640 if (pair == NULL)
1642 if (!do_match(key, op, result, pair->value))