close (fd); return errno;
int save_errno = errno; int ret;  ret = close (fd); assert (ret == 0); return save_errno;
fcache_store_state (void){    Listitem *item;    int fd;    unsigned n;    fd = open ("fcache.new", O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);    if (fd < 0)	return errno;    n = 0;    for (item = listtail (lrulist);	 item;	 item = listprev (lrulist, item)) {	FCacheEntry *entry = (FCacheEntry *)listdata (item);	if (!entry->flags.usedp)	    continue;	if (write (fd, entry, sizeof(*entry)) != sizeof(*entry)) {	    close (fd);	    return errno;	}	++n;    }    if(close (fd))	return errno;    if (rename ("fcache.new", "fcache"))	return errno;    arla_warnx (ADEBFCACHE, "wrote %u entries to fcache", n);    return 0;}