struct dm_config_node *cn = NULL, *cn_pvs;
struct dm_hash_node *n;
const char *id;
- response res;
+ response res = { 0 };
buffer_init( &res.buffer );
{
const char *pvid = daemon_request_str(r, "uuid", NULL);
int64_t devt = daemon_request_int(r, "device", 0);
- response res;
+ response res = { 0 };
struct dm_config_node *pv;
buffer_init( &res.buffer );
struct dm_hash_node *n;
const char *id;
const char *name;
- response res;
+ response res = { 0 };
buffer_init( &res.buffer );
{
struct dm_config_tree *cft;
struct dm_config_node *metadata, *n;
- response res;
+ response res = { 0 };
const char *uuid = daemon_request_str(r, "uuid", NULL);
const char *name = daemon_request_str(r, "name", NULL);
if (!(n = n->sib = dm_config_clone_node(res.cft, metadata, 1)))
goto bad;
n->parent = res.cft->root;
- res.error = 0;
unlock_vg(s, uuid);
update_pv_status(s, res.cft, n, 1); /* FIXME report errors */
static response dump(lvmetad_state *s)
{
- response res;
+ response res = { 0 };
struct buffer *b = &res.buffer;
buffer_init(b);
daemon_handle daemon_open(daemon_info i) {
daemon_handle h = { .protocol_version = 0, .error = 0 };
- daemon_reply r = { .cft = NULL };
+ daemon_reply r = { 0 };
struct sockaddr_un sockaddr = { .sun_family = AF_UNIX };
if ((h.socket_fd = socket(PF_UNIX, SOCK_STREAM /* | SOCK_NONBLOCK */, 0)) < 0)
daemon_reply daemon_send(daemon_handle h, daemon_request rq)
{
struct buffer buffer;
- daemon_reply reply = { .cft = NULL, .error = 0 };
+ daemon_reply reply = { 0 };
assert(h.socket_fd >= 0);
buffer = rq.buffer;
daemon_reply daemon_send_simple_v(daemon_handle h, const char *id, va_list ap)
{
- static const daemon_reply err = { .error = ENOMEM, .buffer = { 0, 0, NULL }, .cft = NULL };
+ static const daemon_reply err = { .error = ENOMEM };
daemon_request rq = { .cft = NULL };
daemon_reply repl;