alsa: changed ret values
[transsip.git] / src / die.h
blob55aae511284750b4db54ad5590eed42a7c62ef56
1 /*
2 * transsip - the telephony network
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011, 2012 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 * Swiss federal institute of technology (ETH Zurich)
6 * Subject to the GPL, version 2.
7 */
9 #ifndef DIE_H
10 #define DIE_H
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <stdarg.h>
15 #include <string.h>
16 #include <errno.h>
17 #include <unistd.h>
19 static inline void die(void)
21 exit(EXIT_FAILURE);
24 static inline void panic(char *msg, ...)
26 va_list vl;
27 va_start(vl, msg);
28 vfprintf(stderr, msg, vl);
29 va_end(vl);
30 fflush(stderr);
31 die();
34 static inline void whine(char *msg, ...)
36 va_list vl;
37 va_start(vl, msg);
38 vfprintf(stderr, msg, vl);
39 va_end(vl);
40 fflush(stderr);
43 #endif /* DIE_H */