diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-12 10:57:28 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-12 10:57:28 +0200 |
| commit | ca65478c8968434c78aacf4a102ccbbe4a66ad9e (patch) | |
| tree | a7b8e02be5fb457e1c3f0e646e212911048390b6 /util.c | |
| parent | some more simplifications of intro comment in dwm.h, this should suffice for ... (diff) | |
| download | dwm-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.c | 12 |
1 files changed, 4 insertions, 8 deletions
| @@ -12,8 +12,7 @@ | |||
| 12 | /* extern */ | 12 | /* extern */ |
| 13 | 13 | ||
| 14 | void * | 14 | void * |
| 15 | emallocz(unsigned int size) | 15 | emallocz(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 | ||
| 24 | void | 23 | void |
| 25 | eprint(const char *errstr, ...) | 24 | eprint(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 | ||
| 35 | void * | 33 | void * |
| 36 | erealloc(void *ptr, unsigned int size) | 34 | erealloc(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 | ||
| 44 | void | 41 | void |
| 45 | spawn(Arg *arg) | 42 | spawn(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"))) |
