summaryrefslogtreecommitdiff
path: root/mysys/my_copy.c
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-12-27 02:01:58 +0200
committerunknown <bell@sanja.is.com.ua>2005-12-27 02:01:58 +0200
commit6759bbce9ac1a01f5f218d777a5a6e4fb0ceab0d (patch)
tree43efb829d7a5df3c521069b80e5498900878a797 /mysys/my_copy.c
parenteb12c38b47b3952de3f752a93ec1e27b782a4c6f (diff)
downloadmariadb-git-6759bbce9ac1a01f5f218d777a5a6e4fb0ceab0d.tar.gz
Avoiding conditional jump on uninitialized variable (BUG#14904).
Diffstat (limited to 'mysys/my_copy.c')
-rw-r--r--mysys/my_copy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index 072492172e3..2fb022a25f2 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -53,7 +53,7 @@ struct utimbuf {
int my_copy(const char *from, const char *to, myf MyFlags)
{
uint Count;
- my_bool new_file_stat; /* 1 if we could stat "to" */
+ my_bool new_file_stat= 0; /* 1 if we could stat "to" */
int create_flag;
File from_file,to_file;
char buff[IO_SIZE];
@@ -62,7 +62,6 @@ int my_copy(const char *from, const char *to, myf MyFlags)
DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags));
from_file=to_file= -1;
- LINT_INIT(new_file_stat);
DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */
if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */
new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0)));