libsl

shared code master of various suckless projects
git clone git://git.suckless.org/libsl
Log | Files | Refs | LICENSE

commit 32fa3f5a65103864190c2e0bf4dc195b79b00a65
parent a8e80c1c5ec435323692b51369901f83c2ffa1b8
Author: explosion-mental <explosion0mental@gmail.com>
Date:   Sun,  7 Aug 2022 23:00:36 -0500

code-style: sort function alphabetically

die should be before ecalloc

as defined in util.h.
Also, move a bracket `{` below the function(arguments)

Diffstat:
Mutil.c | 23++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/util.c b/util.c @@ -6,18 +6,9 @@ #include "util.h" -void * -ecalloc(size_t nmemb, size_t size) -{ - void *p; - - if (!(p = calloc(nmemb, size))) - die("calloc:"); - return p; -} - void -die(const char *fmt, ...) { +die(const char *fmt, ...) +{ va_list ap; va_start(ap, fmt); @@ -33,3 +24,13 @@ die(const char *fmt, ...) { exit(1); } + +void * +ecalloc(size_t nmemb, size_t size) +{ + void *p; + + if (!(p = calloc(nmemb, size))) + die("calloc:"); + return p; +}