msgbuf: Rename 'destroy' APIs to 'complete'

Change the language to better reflect the intent, with the impending
introduction of the ability to 'discard' a msgbuf instance.

Change-Id: Idbb79dcc2587a8baef67ffd405e0bc77e66fe995
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/dsp/pdr.c b/src/dsp/pdr.c
index efc94d2..789ceeb 100644
--- a/src/dsp/pdr.c
+++ b/src/dsp/pdr.c
@@ -487,7 +487,7 @@
 			prev = pldm_pdr_get_prev_record(repo, record);
 			return pldm_pdr_remove_record(repo, record, prev);
 		}
-		rc = pldm_msgbuf_destroy(buf);
+		rc = pldm_msgbuf_complete(buf);
 		if (rc) {
 			return rc;
 		}
@@ -1641,7 +1641,7 @@
 	}
 
 	// Add new contained entity as a child of new PDR
-	rc = pldm_msgbuf_destroy(src);
+	rc = pldm_msgbuf_complete(src);
 	if (rc) {
 		goto cleanup_new_record_data;
 	}
@@ -1654,11 +1654,11 @@
 	pldm_msgbuf_copy(dst, src, uint16_t, child_entity_instance_num);
 	pldm_msgbuf_copy(dst, src, uint16_t, child_entity_container_id);
 
-	rc = pldm_msgbuf_destroy(src);
+	rc = pldm_msgbuf_complete(src);
 	if (rc) {
 		goto cleanup_new_record_data;
 	}
-	rc = pldm_msgbuf_destroy(dst);
+	rc = pldm_msgbuf_complete(dst);
 	if (rc) {
 		goto cleanup_new_record_data;
 	}
@@ -1791,15 +1791,15 @@
 	container_id = htole16(container_id);
 	memcpy(container_id_addr, &container_id, sizeof(uint16_t));
 
-	rc = pldm_msgbuf_destroy(dst);
+	rc = pldm_msgbuf_complete(dst);
 	if (rc) {
 		goto cleanup_new_record_data;
 	}
-	rc = pldm_msgbuf_destroy(src_p);
+	rc = pldm_msgbuf_complete(src_p);
 	if (rc) {
 		goto cleanup_new_record_data;
 	}
-	rc = pldm_msgbuf_destroy(src_c);
+	rc = pldm_msgbuf_complete(src_c);
 	if (rc) {
 		goto cleanup_new_record_data;
 	}
@@ -1878,7 +1878,7 @@
 			}
 		}
 	cleanup:
-		rc = pldm_msgbuf_destroy(dst);
+		rc = pldm_msgbuf_complete(dst);
 		if (rc) {
 			return rc;
 		}
@@ -2006,8 +2006,8 @@
 		pldm_msgbuf_insert(dst, e.entity_container_id);
 	}
 
-	if ((rc = pldm_msgbuf_destroy(src)) ||
-	    (rc = pldm_msgbuf_destroy(dst)) ||
+	if ((rc = pldm_msgbuf_complete(src)) ||
+	    (rc = pldm_msgbuf_complete(dst)) ||
 	    (rc = pldm_pdr_replace_record(repo, record, prev, new_record))) {
 		goto cleanup_new_record_data;
 	}
@@ -2079,7 +2079,7 @@
 	pldm_msgbuf_span_required(dst, skip_data_size, (void **)&skip_data);
 	pldm_msgbuf_extract(dst, record_fru_rsi);
 
-	rc = pldm_msgbuf_destroy(dst);
+	rc = pldm_msgbuf_complete(dst);
 	if (rc) {
 		return rc;
 	}
@@ -2166,7 +2166,7 @@
 			return pldm_pdr_remove_record(repo, record, prev);
 		}
 	cleanup:
-		rc = pldm_msgbuf_destroy(buf);
+		rc = pldm_msgbuf_complete(buf);
 		if (rc) {
 			return rc;
 		}