Suppress some compiler warnings

This commit is contained in:
Holger Vogt
2020-12-22 17:56:19 +01:00
parent 3c2f6585e0
commit 238f8d393a
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ char *dup_string(const char *str, size_t n_char)
char *p;
if ((p = TMALLOC(char, n_char + 1)) != NULL) {
(void) strncpy(p, str, n_char);
(void) strncpy(p, str, n_char + 1);
p[n_char] = '\0';
}
return p;