mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-09 03:02:27 +03:00
tweaks: exclude an unlikely error message from the tiny version
This commit is contained in:
parent
1f7384ebd2
commit
899bf0ae3a
@ -378,9 +378,10 @@ char *mallocstrncpy(char *dest, const char *src, size_t n)
|
|||||||
if (src == NULL)
|
if (src == NULL)
|
||||||
src = "";
|
src = "";
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
if (src == dest)
|
if (src == dest)
|
||||||
fprintf(stderr, "\r*** Copying a string to itself -- please report a bug ***");
|
fprintf(stderr, "\r*** Copying a string to itself -- please report a bug ***");
|
||||||
|
#endif
|
||||||
dest = charealloc(dest, n);
|
dest = charealloc(dest, n);
|
||||||
strncpy(dest, src, n);
|
strncpy(dest, src, n);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user