diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-09-20 19:38:27 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-09-20 19:38:27 +0300 |
commit | 5f9c629da0c08cd742a16419f4f66cdb18505302 (patch) | |
tree | ad4e24d8e0c89aa34df2ac3c29604994eeb10a1d /plugin | |
parent | 353739fdef95fb1765dbbadf14ce1a9849a36137 (diff) | |
download | mariadb-git-5f9c629da0c08cd742a16419f4f66cdb18505302.tar.gz |
WL#1054: code style remarks fixed.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/auth/auth_socket.c | 2 | ||||
-rw-r--r-- | plugin/auth/dialog.c | 10 | ||||
-rw-r--r-- | plugin/auth/test_plugin.c | 5 |
3 files changed, 9 insertions, 8 deletions
diff --git a/plugin/auth/auth_socket.c b/plugin/auth/auth_socket.c index 20f5350774b..dbd440025d7 100644 --- a/plugin/auth/auth_socket.c +++ b/plugin/auth/auth_socket.c @@ -46,7 +46,7 @@ static int socket_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) return CR_ERROR; } - info->password_used = 2; + info->password_used= PASSWORD_USED_NO_MENTION; vio->info(vio, &vio_info); if (vio_info.protocol != MYSQL_VIO_SOCKET) diff --git a/plugin/auth/dialog.c b/plugin/auth/dialog.c index dba390b8542..61cc11e23e2 100644 --- a/plugin/auth/dialog.c +++ b/plugin/auth/dialog.c @@ -78,10 +78,10 @@ static int two_questions(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) if ((pkt_len= vio->read_packet(vio, &pkt)) < 0) return CR_ERROR; - info->password_used = 1; + info->password_used= PASSWORD_USED_YES; /* fail if the password is wrong */ - if (strcmp((const char *)pkt, info->auth_string)) + if (strcmp((const char *) pkt, info->auth_string)) return CR_ERROR; /* send the last, ordinary, question */ @@ -93,7 +93,7 @@ static int two_questions(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) return CR_ERROR; /* check the reply */ - return strcmp((const char *)pkt, "yes, of course") ? CR_ERROR : CR_OK; + return strcmp((const char *) pkt, "yes, of course") ? CR_ERROR : CR_OK; } static struct st_mysql_auth two_handler= @@ -120,7 +120,7 @@ static int three_attempts(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) if ((pkt_len= vio->read_packet(vio, &pkt)) < 0) return CR_ERROR; - info->password_used = 1; + info->password_used= PASSWORD_USED_YES; /* finish, if the password is correct. @@ -310,7 +310,7 @@ static int init_dialog(char *unused1 __attribute__((unused)), va_list unused4 __attribute__((unused))) { void *sym= dlsym(RTLD_DEFAULT, "mysql_authentication_dialog_ask"); - ask= sym ? (mysql_authentication_dialog_ask_t)sym : builtin_ask; + ask= sym ? (mysql_authentication_dialog_ask_t) sym : builtin_ask; return 0; } diff --git a/plugin/auth/test_plugin.c b/plugin/auth/test_plugin.c index 9786da799fe..1fa1ad4bf61 100644 --- a/plugin/auth/test_plugin.c +++ b/plugin/auth/test_plugin.c @@ -70,7 +70,7 @@ static int auth_test_plugin(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) if ((pkt_len= vio->read_packet(vio, &pkt)) < 0) return CR_ERROR; - info->password_used = 1; + info->password_used= PASSWORD_USED_YES; /* fail if the password is wrong */ if (strcmp((const char *) pkt, info->auth_string)) @@ -177,7 +177,8 @@ static int test_plugin_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) if (!reply) return CR_ERROR; /* send the reply to the server */ - res= vio->write_packet(vio, (const unsigned char *)reply, strlen(reply)+1); + res= vio->write_packet(vio, (const unsigned char *) reply, + strlen(reply) + 1); if (res) return CR_ERROR; |