Lines Matching refs:list
86 * Add a record to a list
89 add_name(struct dlz_example_data *state, struct record *list,
97 if (first_empty == -1 && strlen(list[i].name) == 0U) {
100 if (strcasecmp(list[i].name, name) != 0)
102 if (strcasecmp(list[i].type, type) != 0)
104 if (!single && strcasecmp(list[i].data, data) != 0)
118 if (strlen(name) >= sizeof(list[i].name) ||
119 strlen(type) >= sizeof(list[i].type) ||
120 strlen(data) >= sizeof(list[i].data))
123 strncpy(list[i].name, name, sizeof(list[i].name));
124 list[i].name[sizeof(list[i].name) - 1] = '\0';
126 strncpy(list[i].type, type, sizeof(list[i].type));
127 list[i].type[sizeof(list[i].type) - 1] = '\0';
129 strncpy(list[i].data, data, sizeof(list[i].data));
130 list[i].data[sizeof(list[i].data) - 1] = '\0';
132 list[i].ttl = ttl;
138 * Delete a record from a list
141 del_name(struct dlz_example_data *state, struct record *list,
150 if (strcasecmp(name, list[i].name) == 0 &&
151 strcasecmp(type, list[i].type) == 0 &&
152 strcasecmp(data, list[i].data) == 0 &&
153 ttl == list[i].ttl) {
160 memset(&list[i], 0, sizeof(struct record));
657 const char *rdatastr, struct record *list)
703 result = add_name(state, list, name, type,