diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:00:17 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:00:17 -0300 |
commit | ed9ffc6b09a13197f3aadaf89c1dd3accee2dfd1 (patch) | |
tree | 92777d90b1eaff5ab0cb99603ecd3c4abf18d145 /sql/sql_acl.cc | |
parent | 4f59204b496f1e3fd97b85439d84089f47113630 (diff) | |
download | mariadb-git-ed9ffc6b09a13197f3aadaf89c1dd3accee2dfd1.tar.gz |
Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 9640b8db1b2..90eef872115 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1653,12 +1653,10 @@ bool change_password(THD *thd, const char *host, const char *user, result= 0; if (mysql_bin_log.is_open()) { - query_length= - my_sprintf(buff, - (buff,"SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'", - acl_user->user ? acl_user->user : "", - acl_user->host.hostname ? acl_user->host.hostname : "", - new_password)); + query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'", + acl_user->user ? acl_user->user : "", + acl_user->host.hostname ? acl_user->host.hostname : "", + new_password); thd->clear_error(); result= thd->binlog_query(THD::MYSQL_QUERY_TYPE, buff, query_length, FALSE, FALSE, 0); |