projects
/
suckless
/
dmenu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28fb3e2
)
sync code-style patch from libsl
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Mon, 8 Aug 2022 08:42:54 +0000
(10:42 +0200)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Mon, 8 Aug 2022 08:42:54 +0000
(10:42 +0200)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index fe044fc7b7978d1f3c23768e315aae415d90b11a..96b82c980c4ce304d329fc60e582379ab0400993 100644
(file)
--- 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;
+}