void device_clear(struct device *device) { int probenum; /* TODO: plugin-specific clear call? */ if(device->probes) for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++) device_probe_clear(device, probenum); }
void device_clear(struct device *device) { unsigned int pnum; /* TODO: Plugin-specific clear call? */ if (!device->probes) return; for (pnum = 1; pnum <= g_slist_length(device->probes); pnum++) device_probe_clear(device, pnum); }
void device_destroy(struct device *device) { int probenum; /* TODO: plugin-specific destroy call, need to decrease refcount in plugin */ devices = g_slist_remove(devices, device); if(device->probes) { for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++) device_probe_clear(device, probenum); g_slist_free(device->probes); } g_free(device); }