Chris Webb --> dwm (2007-09-24 14:30:23 +0100):
> This morning I've been thinking about run time configuration of dwm.
[...]
I only glanced at the code, but this seems to be a useful idea!
> +void *
> +erealloc(void *res, unsigned int size) {
> + if (!(res = res ? realloc(res, size) : malloc(size)))
> + eprint("fatal: could not realloc() %u bytes\n", size);
> + return res;
> +}
Hmm, why using the ternary operator? Are there systems where
`realloc(NULL, size)' does not behave identically to `malloc(size)'?
Regards, Jukka
-- bashian roulette: $ ((RANDOM%6)) || rm -rf ~Received on Mon Sep 24 2007 - 21:16:48 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:55:21 UTC