summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common.c b/common.c
index 8be0428..b3e5ad2 100644
--- a/common.c
+++ b/common.c
@@ -110,8 +110,7 @@ void sstrncpy(char *d, const char *s, size_t len)
void sstrncat(char *d, const char *s, size_t len)
{
- strncat(d, s, len);
- d[len - 1] = 0;
+ strncat(d, s, len - 1);
}
char *sstrdup(const char *s)