From 992587f4115320b497d8a7e3fb5fbcba8eb7ce8a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Sep 2003 20:34:58 +0400 Subject: [PATCH] Bugfix for bug #1340, style fix before push client/mysqlbinlog.cc: Small fix to avoid double initialization --- client/mysqlbinlog.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 43872dd718a..6eab790857d 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -200,10 +200,8 @@ public: } void process(Append_block_log_event *ae) { - Create_file_log_event* ce= 0; - - if (ae->file_id < file_names.elements) - ce= *((Create_file_log_event**)file_names.buffer + ae->file_id); + Create_file_log_event* ce= (ae->file_id < file_names.elements) ? + *((Create_file_log_event**)file_names.buffer + ae->file_id) : 0; if (ce) append_to_file(ce->fname,O_APPEND|O_BINARY|O_WRONLY,ae->block,ae->block_len);