MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / sr_config_new

Function sr_config_new

libsigrok4DSL/hwdriver.c:171–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169
170/** A floating reference can be passed in for data. */
171SR_PRIV struct sr_config *sr_config_new(int key, GVariant *data)
172{
173 struct sr_config *src;
174 assert(data);
175
176 if (!(src = malloc(sizeof(struct sr_config)))){
177 sr_err("%s,ERROR:failed to alloc memory.", __func__);
178 return NULL;
179 }
180 //not need init.
181
182 src->key = key;
183 src->data = g_variant_ref_sink(data);
184 return src;
185}
186
187SR_PRIV void sr_config_free(struct sr_config *src)
188{

Callers 4

ds_new_configFunction · 0.85
loadfileFunction · 0.85
loadfileFunction · 0.85
loadfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected