From 06c806215e66f74d231176a53275ce7776e2f997 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 11 Jul 2016 20:10:10 +0200
Subject: [PATCH] tweaks: improve two comments

---
 src/utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/utils.c b/src/utils.c
index 0e1c55fa..7d06f128 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -404,8 +404,8 @@ void *nrealloc(void *ptr, size_t howmuch)
     return r;
 }
 
-/* Copy the first n characters of one malloc()ed string to another
- * pointer.  Should be used as: "dest = mallocstrncpy(dest, src, n);". */
+/* Allocate and copy the first n characters of the given src string, after
+ * freeing the destination.  Usage: "dest = mallocstrncpy(dest, src, n);". */
 char *mallocstrncpy(char *dest, const char *src, size_t n)
 {
     if (src == NULL)
@@ -420,7 +420,7 @@ char *mallocstrncpy(char *dest, const char *src, size_t n)
     return dest;
 }
 
-/* Copy one malloc()ed string to another pointer.  Should be used as:
+/* Free the dest string and return a malloc'ed copy of src.  Should be used as:
  * "dest = mallocstrcpy(dest, src);". */
 char *mallocstrcpy(char *dest, const char *src)
 {
-- 
GitLab