summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-12 10:57:28 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-12 10:57:28 +0200
commitca65478c8968434c78aacf4a102ccbbe4a66ad9e (patch)
treea7b8e02be5fb457e1c3f0e646e212911048390b6 /util.c
parentsome more simplifications of intro comment in dwm.h, this should suffice for ... (diff)
downloaddwm-ca65478c8968434c78aacf4a102ccbbe4a66ad9e.tar.gz
dwm-ca65478c8968434c78aacf4a102ccbbe4a66ad9e.zip
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Diffstat (limited to '')
-rw-r--r--util.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/util.c b/util.c
index 91df00b..1147133 100644
--- a/util.c
+++ b/util.c
@@ -12,8 +12,7 @@
12/* extern */ 12/* extern */
13 13
14void * 14void *
15emallocz(unsigned int size) 15emallocz(unsigned int size) {
16{
17 void *res = calloc(1, size); 16 void *res = calloc(1, size);
18 17
19 if(!res) 18 if(!res)
@@ -22,8 +21,7 @@ emallocz(unsigned int size)
22} 21}
23 22
24void 23void
25eprint(const char *errstr, ...) 24eprint(const char *errstr, ...) {
26{
27 va_list ap; 25 va_list ap;
28 26
29 va_start(ap, errstr); 27 va_start(ap, errstr);
@@ -33,8 +31,7 @@ eprint(const char *errstr, ...)
33} 31}
34 32
35void * 33void *
36erealloc(void *ptr, unsigned int size) 34erealloc(void *ptr, unsigned int size) {
37{
38 void *res = realloc(ptr, size); 35 void *res = realloc(ptr, size);
39 if(!res) 36 if(!res)
40 eprint("fatal: could not malloc() %u bytes\n", size); 37 eprint("fatal: could not malloc() %u bytes\n", size);
@@ -42,8 +39,7 @@ erealloc(void *ptr, unsigned int size)
42} 39}
43 40
44void 41void
45spawn(Arg *arg) 42spawn(Arg *arg) {
46{
47 static char *shell = NULL; 43 static char *shell = NULL;
48 44
49 if(!shell && !(shell = getenv("SHELL"))) 45 if(!shell && !(shell = getenv("SHELL")))