* This function can also return None, if it failed to allocate memory
* for the return value and status code.
*/
* This function can also return None, if it failed to allocate memory
* for the return value and status code.
*/
bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
const bt_plugin_set *plugin_set)
{
bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
const bt_plugin_set *plugin_set)
{
- static const char * const err = "Failed to create a map value.";
- BT_LOGE_STR(err);
- BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name, err);
+#define BT_FMT "Failed to create a map value."
+ BT_LOGE_STR(BT_FMT);
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name, BT_FMT);
+#undef BT_FMT
g_ptr_array_index(auto_disc.results, i);
bt_value_array_append_element_status append_element_status;
g_ptr_array_index(auto_disc.results, i);
bt_value_array_append_element_status append_element_status;
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");
if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to append one array element.");