aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2025-07-12 11:18:23 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2025-07-12 11:18:23 -0400
commit191c62f3e6720c10e05a887018c116ec7de5909c (patch)
tree1a49284d03c6f6e5c953c875f27792673bbf24b4
parentRefactor usage of linebuffer to avoid using internal _num_words (diff)
downloadcli-191c62f3e6720c10e05a887018c116ec7de5909c.zip
Add explanation comment for strlcat
-rw-r--r--src/strlcat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/strlcat.c b/src/strlcat.c
index 5c317c6..ccd3720 100644
--- a/src/strlcat.c
+++ b/src/strlcat.c
@@ -1,3 +1,7 @@
+// NOTE: `strlcat` is a safer version of `strcat` that ensures the destination
+// buffer is not overflowed. However, it's not available in all standard
+// libraries. Therefore, we conditionally include it here depending on if the
+// system has it available by default.
#include <stddef.h>
#include <string.h>