diff options
| author | Vincent Douillet <vincent@vdouillet.fr> | 2024-01-23 09:22:00 +0100 |
|---|---|---|
| committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-02-08 09:27:54 +0100 |
| commit | 42f538cc66546997a166dbe67e489c9afabbb908 (patch) | |
| tree | 718bb6b7161892c4b964499c1818c6d7bf0bd6a6 /util.c | |
| parent | 760031b4a74d70bdeaab4ce9aedfe772acd05bd3 (diff) | |
download files
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -42,21 +42,3 @@ read_file(char *path, char **output, size_t * read_size) return 0; } - -char * -v_strcpy(char *str, size_t len) -{ - char *new_str; - size_t new_len; - - new_str = (char *) malloc(sizeof(char) * (len + 1)); - if (new_str == NULL) - return NULL; - - new_len = strlcpy(new_str, str, len + 1); - if (new_len >= len + 1) { - free(new_str); - return NULL; - } - return new_str; -} |
