ds_put_vformat (&text, msg, args);
va_end (args);
- struct msg m = {
+ struct msg *m = xmalloc (sizeof *m);
+ *m = (struct msg) {
.category = MSG_C_GENERAL,
.severity = MSG_S_ERROR,
- .text = ds_cstr (&text),
+ .text = ds_steal_cstr (&text),
};
- msg_emit (&m);
+ msg_emit (m);
r->ok = false;
ds_put_vformat (&text, msg, args);
va_end (args);
- struct msg m = {
+ struct msg *m = xmalloc (sizeof *m);
+ *m = (struct msg) {
.category = MSG_C_GENERAL,
.severity = MSG_S_WARNING,
- .text = ds_cstr (&text),
+ .text = ds_steal_cstr (&text),
};
- msg_emit (&m);
+ msg_emit (m);
}
/* Close and destroy R.
int width = caseproto_get_width (r->proto, i);
if (width == 0)
- case_data_rw_idx (c, i)->f = read_float (r);
+ *case_num_rw_idx (c, i) = read_float (r);
else
{
uint8_t buf[256];