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