forked from Ivasoft/DSView
Code refactoring 6
This commit is contained in:
@@ -308,7 +308,7 @@ static GSList *scan(GSList *options)
|
||||
}
|
||||
else {
|
||||
char *firmware;
|
||||
char *res_path = sr_get_firmware_res_path();
|
||||
char *res_path = DS_RES_PATH;
|
||||
if (!(firmware = g_try_malloc(strlen(res_path)+strlen(prof->firmware)+1))) {
|
||||
sr_err("Firmware path malloc error!");
|
||||
return NULL;
|
||||
|
||||
@@ -1919,7 +1919,7 @@ SR_PRIV int dsl_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi, gboo
|
||||
if (sdi->status == SR_ST_ACTIVE) {
|
||||
if (!(*fpga_done)) {
|
||||
char *fpga_bit;
|
||||
char *res_path = sr_get_firmware_res_path();
|
||||
char *res_path = DS_RES_PATH;
|
||||
if (!(fpga_bit = g_try_malloc(strlen(res_path)+strlen(devc->profile->fpga_bit33)+1))) {
|
||||
sr_err("fpag_bit path malloc error!");
|
||||
return SR_ERR_MALLOC;
|
||||
|
||||
@@ -379,7 +379,7 @@ static GSList *scan(GSList *options)
|
||||
}
|
||||
else {
|
||||
char *firmware;
|
||||
char *res_path = sr_get_firmware_res_path();
|
||||
char *res_path = DS_RES_PATH;
|
||||
if (!(firmware = g_try_malloc(strlen(res_path)+strlen(prof->firmware)+1))) {
|
||||
sr_err("Firmware path malloc error!");
|
||||
return NULL;
|
||||
@@ -1008,7 +1008,7 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
|
||||
ret = SR_ERR;
|
||||
}
|
||||
char *fpga_bit;
|
||||
char *res_path = sr_get_firmware_res_path();
|
||||
char *res_path = DS_RES_PATH;
|
||||
if (!(fpga_bit = g_try_malloc(strlen(res_path)+strlen(devc->profile->fpga_bit33)+1))) {
|
||||
sr_err("fpag_bit path malloc error!");
|
||||
return SR_ERR_MALLOC;
|
||||
|
||||
Reference in New Issue
Block a user