cache.add(genNegCacheEntry(DNSName("www1.powerdns.com"), DNSName("powerdns.com"), now));
cache.add(genNegCacheEntry(DNSName("www2.powerdns.com"), DNSName("powerdns.com"), now));
- auto fp = std::unique_ptr<FILE, int (*)(FILE*)>(tmpfile(), fclose);
- if (!fp)
+ auto fp = pdns::UniqueFilePtr(tmpfile());
+ if (!fp) {
BOOST_FAIL("Temporary file could not be opened");
+ }
cache.doDump(fileno(fp.get()), 0, now.tv_sec);