[hackers] [libs-style][PATCH] codestyle: die should be before ecalloc

From: <explosion0mental_AT_gmail.com>
Date: Sun, 7 Aug 2022 23:00:36 -0500

From: explosion-mental <explosion0mental_AT_gmail.com>

as defined in util.h.
Also, move a bracket `{` below the function(arguments)
---
 util.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/util.c b/util.c
index fe044fc..96b82c9 100644
--- a/util.c
+++ b/util.c
_AT_@ -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);
_AT_@ -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;
+}
-- 
2.37.1
Received on Mon Aug 08 2022 - 06:00:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 08 2022 - 07:12:35 CEST