Lines Matching refs:list
89 * Add a record to a list
92 add_name(struct dlz_example_data *state, struct record *list,
100 if (first_empty == -1 && strlen(list[i].name) == 0U) {
103 if (strcasecmp(list[i].name, name) != 0)
105 if (strcasecmp(list[i].type, type) != 0)
107 if (!single && strcasecmp(list[i].data, data) != 0)
121 if (strlen(name) >= sizeof(list[i].name) ||
122 strlen(type) >= sizeof(list[i].type) ||
123 strlen(data) >= sizeof(list[i].data))
126 strncpy(list[i].name, name, sizeof(list[i].name));
127 list[i].name[sizeof(list[i].name) - 1] = '\0';
129 strncpy(list[i].type, type, sizeof(list[i].type));
130 list[i].type[sizeof(list[i].type) - 1] = '\0';
132 strncpy(list[i].data, data, sizeof(list[i].data));
133 list[i].data[sizeof(list[i].data) - 1] = '\0';
135 list[i].ttl = ttl;
141 * Delete a record from a list
144 del_name(struct dlz_example_data *state, struct record *list,
153 if (strcasecmp(name, list[i].name) == 0 &&
154 strcasecmp(type, list[i].type) == 0 &&
155 strcasecmp(data, list[i].data) == 0 &&
156 ttl == list[i].ttl) {
163 memset(&list[i], 0, sizeof(struct record));
705 const char *rdatastr, struct record *list)
751 result = add_name(state, list, name, type,