busybox: Clear errstr after setting errno
[akaros.git] / tools / apps / busybox / akaros-patches / 1.17.3 / 0009-unset_errno.patch
1 --- a/libbb/copy_file.c 2018-03-01 12:07:42.710585231 -0500
2 +++ b/libbb/copy_file.c 2018-03-01 12:07:20.634470427 -0500
3 @@ -335,6 +335,7 @@
4         /* We are lazy here, a bit lax with races... */
5         if (dest_exists) {
6                 errno = EEXIST;
7 +               errstr()[0] = 0;
8                 ovr = ask_and_unlink(dest, flags);
9                 if (ovr <= 0)
10                         return ovr;