Fix issues with buffer length when getting brand name

* Specifically, address case when brand name is longer than buffer
provided

* Also, slightly modify prototype to match similar, existing APIs.

* Address some cpplint issues.

Change-Id: Iaf77304e23085123e88f301e4b33bc4e6be2a225
This commit is contained in:
Chris Freehill
2019-08-25 19:22:05 -05:00
parent 7f2d970a80
commit 01e0800741
2 ha cambiato i file con 12 aggiunte e 7 eliminazioni
+1 -1
Vedi File
@@ -806,7 +806,7 @@ rsmi_status_t rsmi_dev_name_get(uint32_t dv_ind, char *name, size_t len);
* @retval ::RSMI_STATUS_SUCCESS is returned upon successful call.
*
*/
rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, size_t len);
rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, uint32_t len);
/**
* @brief Get the name string for a give vendor ID