Index: attrib.c =================================================================== --- attrib.c (revision 10807) +++ attrib.c (revision 10808) @@ -46,7 +46,7 @@ return NULL; } -int pcb_attribute_put(pcb_attribute_list_t * list, const char *name, const char *value, int replace) +int pcb_attribute_put(pcb_attribute_list_t * list, const char *name, const char *value) { int i; @@ -53,16 +53,14 @@ if ((name == NULL) || (*name == '\0')) return -1; - /* If we're allowed to replace an existing attribute, see if we - can. */ - if (replace) { - for (i = 0; i < list->Number; i++) - if (strcmp(name, list->List[i].name) == 0) { - free(list->List[i].value); - list->List[i].value = pcb_strdup_null(value); - NOTIFY(list, list->List[i].name, list->List[i].value); - return 1; - } + /* Replace an existing attribute if there is a name match. */ + for (i = 0; i < list->Number; i++) { + if (strcmp(name, list->List[i].name) == 0) { + free(list->List[i].value); + list->List[i].value = pcb_strdup_null(value); + NOTIFY(list, list->List[i].name, list->List[i].value); + return 1; + } } /* At this point, we're going to need to add a new attribute to the @@ -121,12 +119,12 @@ list->Max = 0; } -void pcb_attribute_copy_all(pcb_attribute_list_t *dest, const pcb_attribute_list_t *src, int replace) +void pcb_attribute_copy_all(pcb_attribute_list_t *dest, const pcb_attribute_list_t *src) { int i; for (i = 0; i < src->Number; i++) - pcb_attribute_put(dest, src->List[i].name, src->List[i].value, replace); + pcb_attribute_put(dest, src->List[i].name, src->List[i].value); } @@ -152,7 +150,7 @@ return; } } - pcb_attribute_put(dst, name, value, 1); + pcb_attribute_put(dst, name, value); } void pcb_attribute_copyback_end(pcb_attribute_list_t *dst)