No need to assign zero after gmalloc0(). Move comments to declaration.
Reviewed-By: Wolfram Sang <redacted>
struct dev_context *devc;
devc = g_malloc0(sizeof(struct dev_context));
-
- /* Device-specific settings */
- devc->max_samples = devc->max_samplerate = devc->protocol_version = 0;
-
- /* Acquisition settings */
- devc->limit_samples = devc->capture_ratio = 0;
devc->trigger_at = -1;
- devc->flag_reg = 0;
return devc;
}
#define FLAG_DEMUX (1 << 0)
struct dev_context {
+ /* constant device properties: */
int max_channels;
uint32_t max_samples;
uint32_t max_samplerate;
uint32_t protocol_version;
+ /* acquisition-related properties: */
uint64_t cur_samplerate;
uint32_t cur_samplerate_divider;
uint64_t limit_samples;