{
const char *name = notifs[i]->name;
- if (strncmp (buf, name, strlen (name)) == 0
+ if (startswith (buf, name)
&& buf[strlen (name)] == ':')
break;
}
struct remote_notif_state *
remote_notif_state_allocate (void)
{
- struct remote_notif_state *notif_state = xzalloc (sizeof (*notif_state));
+ struct remote_notif_state *notif_state = XCNEW (struct remote_notif_state);
notif_state->notif_queue = QUEUE_alloc (notif_client_p, NULL);