1*ce982eb7SThomas Cort /* $NetBSD: common.c,v 1.1 2007/02/18 22:13:42 rmind Exp $ */ 2*ce982eb7SThomas Cort /* $OpenBSD: common.c,v 1.4 2006/05/25 03:20:32 ray Exp $ */ 3*ce982eb7SThomas Cort 4*ce982eb7SThomas Cort /* 5*ce982eb7SThomas Cort * Written by Raymond Lai <ray@cyth.net>. 6*ce982eb7SThomas Cort * Public domain. 7*ce982eb7SThomas Cort */ 8*ce982eb7SThomas Cort 9*ce982eb7SThomas Cort #include <err.h> 10*ce982eb7SThomas Cort #include <stdlib.h> 11*ce982eb7SThomas Cort #include <unistd.h> 12*ce982eb7SThomas Cort 13*ce982eb7SThomas Cort #include "common.h" 14*ce982eb7SThomas Cort 15*ce982eb7SThomas Cort void cleanup(const char * filename)16*ce982eb7SThomas Cortcleanup(const char *filename) 17*ce982eb7SThomas Cort { 18*ce982eb7SThomas Cort if (unlink(filename)) 19*ce982eb7SThomas Cort err(2, "could not delete: %s", filename); 20*ce982eb7SThomas Cort exit(2); 21*ce982eb7SThomas Cort } 22