summaryrefslogtreecommitdiffstats
path: root/xmalloc.c
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2020-11-13 23:29:23 +0100
committerpgen <p.gen.progs@gmail.com>2020-11-13 23:57:46 +0100
commit97ee2fbf897a589c861b9379b41f8b9a70855cf5 (patch)
tree1cb9ab216d4554aac0d5eba501fec8da2ed0388a /xmalloc.c
parent0e6328f3f08945d04d565d78cd413e9c355fb1f0 (diff)
Improve comments
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/xmalloc.c b/xmalloc.c
index b7ea8fc..9f6caa1 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,10 +1,10 @@
-/* *************************** */
-/* Memory management functions */
-/* *************************** */
+/* **************************** */
+/* Memory management functions. */
+/* **************************** */
-/* Created by Kevin Locke (from numerous canonical examples) */
+/* Created by Kevin Locke (from numerous canonical examples). */
/* */
-/* Adapted for use by smenu */
+/* Adapted for use by smenu. */
/* */
/* I hereby place this file in the public domain. It may be freely */
/* reproduced, distributed, used, modified, built upon, or otherwise */
@@ -18,9 +18,9 @@
#include "xmalloc.h"
-/* ================= */
-/* Customized malloc */
-/* ================= */
+/* ================== */
+/* Customized malloc. */
+/* ================== */
void *
xmalloc(size_t size)
{
@@ -41,9 +41,9 @@ xmalloc(size_t size)
return allocated;
}
-/* ================= */
-/* Customized calloc */
-/* ================= */
+/* ================== */
+/* Customized calloc. */
+/* ================== */
void *
xcalloc(size_t n, size_t size)
{
@@ -64,9 +64,9 @@ xcalloc(size_t n, size_t size)
return allocated;
}
-/* ================== */
-/* Customized realloc */
-/* ================== */
+/* =================== */
+/* Customized realloc. */
+/* =================== */
void *
xrealloc(void * p, size_t size)
{
@@ -85,9 +85,9 @@ xrealloc(void * p, size_t size)
return allocated;
}
-/* =================================== */
-/* strdup implementation using xmalloc */
-/* =================================== */
+/* ==================================== */
+/* strdup implementation using xmalloc. */
+/* ==================================== */
char *
xstrdup(const char * p)
{
@@ -99,10 +99,10 @@ xstrdup(const char * p)
return allocated;
}
-/* ================================================== */
-/* strndup implementation using xmalloc */
-/* This version guarantees that there is a final '\0' */
-/* ================================================== */
+/* =================================================== */
+/* strndup implementation using xmalloc. */
+/* This version guarantees that there is a final '\0'. */
+/* =================================================== */
char *
xstrndup(const char * str, size_t len)
{