1*31342e88Sray /* $OpenBSD: common.c,v 1.4 2006/05/25 03:20:32 ray Exp $ */ 21d3b72fdSotto 31d3b72fdSotto /* 41d3b72fdSotto * Written by Raymond Lai <ray@cyth.net>. 51d3b72fdSotto * Public domain. 61d3b72fdSotto */ 71d3b72fdSotto 81d3b72fdSotto #include <err.h> 91d3b72fdSotto #include <stdlib.h> 101d3b72fdSotto #include <unistd.h> 111d3b72fdSotto 121d3b72fdSotto #include "common.h" 131d3b72fdSotto 141d3b72fdSotto void cleanup(const char * filename)151d3b72fdSottocleanup(const char *filename) 161d3b72fdSotto { 171d3b72fdSotto if (unlink(filename)) 181d3b72fdSotto err(2, "could not delete: %s", filename); 191d3b72fdSotto exit(2); 201d3b72fdSotto } 21