{
char *key;
- if (virAsprintf(&key, "%p-%d", req, req->ifindex) < 0)
- return NULL;
+ key = g_strdup_printf("%p-%d", req, req->ifindex);
virNWFilterSnoopActiveLock();
* extend the filter with the macaddr of the VM; filter the
* more unlikely parameters first, then go for the MAC
*/
- if (virAsprintf(&ext_filter,
- "%s and ether src %s", filter, macaddr) < 0)
- return NULL;
+ ext_filter = g_strdup_printf("%s and ether src %s", filter, macaddr);
} else {
/*
* Some DHCP servers respond via MAC broadcast; we rely on later
}
/* time intf ip dhcpserver */
- if (virAsprintf(&lbuf, "%u %s %s %s\n", ipl->timeout,
- ifkey, ipstr, dhcpstr) < 0) {
- ret = -1;
- goto cleanup;
- }
+ lbuf = g_strdup_printf("%u %s %s %s\n", ipl->timeout, ifkey, ipstr, dhcpstr);
len = strlen(lbuf);
if (safewrite(lfd, lbuf, len) != len) {