diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2021-12-30 14:38:40 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2021-12-30 14:38:40 +0100 |
commit | d05765c670befc42e55b05a0fd75bb7771076c04 (patch) | |
tree | 3d825bdb8dcf76a5306b1d5ffaef807732d8ec8a /tools.c | |
parent | a5a4b72d1c20c3a97e268365f90060707feaf4b2 (diff) | |
download | vdr-d05765c670befc42e55b05a0fd75bb7771076c04.tar.gz vdr-d05765c670befc42e55b05a0fd75bb7771076c04.tar.bz2 |
Replaced strncpy() with memcpy() in strreplace() to avoid a compiler warning
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 5.4 2021/05/20 10:13:43 kls Exp $ + * $Id: tools.c 5.5 2021/12/30 14:35:40 kls Exp $ */ #include "tools.h" @@ -170,7 +170,7 @@ char *strreplace(char *s, const char *s1, const char *s2) char *sof = s + of; if (l2 != l1) memmove(sof + l2, sof + l1, l - of - l1 + 1); - strncpy(sof, s2, l2); + memcpy(sof, s2, l2); } return s; } |