diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-03 12:21:13 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-03 12:21:13 +0300 |
commit | 769f6d2db72dd70ff2fef69bed02fb4124a682ab (patch) | |
tree | 043c2b7e3fb50a295914eb1f3bb0e767614c2070 /sql | |
parent | 0d3972c6bef357dfd4aef0ecdb03b5ac34844e45 (diff) | |
download | mariadb-git-769f6d2db72dd70ff2fef69bed02fb4124a682ab.tar.gz |
Fix -Wclass-memaccess in WSREP,InnoDB,XtraDB
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.h | 4 | ||||
-rw-r--r-- | sql/wsrep_xid.cc | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sql/handler.h b/sql/handler.h index d17bccab25c..42429e9dcbe 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -2,7 +2,7 @@ #define HANDLER_INCLUDED /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2018, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -602,7 +602,7 @@ struct xid_t { bqual_length= b; memcpy(data, d, g+b); } - bool is_null() { return formatID == -1; } + bool is_null() const { return formatID == -1; } void null() { formatID= -1; } my_xid quick_get_my_xid() { diff --git a/sql/wsrep_xid.cc b/sql/wsrep_xid.cc index f7ea836d494..132956e88b3 100644 --- a/sql/wsrep_xid.cc +++ b/sql/wsrep_xid.cc @@ -129,12 +129,11 @@ void wsrep_get_SE_checkpoint(wsrep_uuid_t& uuid, wsrep_seqno_t& seqno) seqno= WSREP_SEQNO_UNDEFINED; XID xid; - memset(&xid, 0, sizeof(xid)); - xid.formatID= -1; + xid.null(); wsrep_get_SE_checkpoint(xid); - if (xid.formatID == -1) return; // nil XID + if (xid.is_null()) return; if (!wsrep_is_wsrep_xid(&xid)) { |