!strcmp(regtype, "_ipps._tcp") ? "IPPS" : "IPP",
replyDomain));
- if ((device = calloc(sizeof(_cups_dnssd_device_t), 1)) != NULL)
- {
- device->dest.name = _cupsStrAlloc(name);
- device->domain = _cupsStrAlloc(replyDomain);
- device->regtype = _cupsStrAlloc(regtype);
+ if ((device = calloc(sizeof(_cups_dnssd_device_t), 1)) == NULL)
+ return (NULL);
- device->dest.num_options = cupsAddOption("printer-info", serviceName, 0, &device->dest.options);
+ device->dest.name = _cupsStrAlloc(name);
+ device->domain = _cupsStrAlloc(replyDomain);
+ device->regtype = _cupsStrAlloc(regtype);
- cupsArrayAdd(data->devices, device);
- }
+ device->dest.num_options = cupsAddOption("printer-info", serviceName, 0, &device->dest.options);
+
+ cupsArrayAdd(data->devices, device);
}
/*