diff options
author | unknown <monty@mysql.com> | 2005-01-11 18:55:53 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-01-11 18:55:53 +0200 |
commit | 4eec8ab1f6547cf4b7fb4877928dfd6abd11a159 (patch) | |
tree | e94b8464c09c302fd16d752c0c20f180bbfe6ab3 /client | |
parent | b4e736b8611c11941bedd24562ccc282281b86d1 (diff) | |
download | mariadb-git-4eec8ab1f6547cf4b7fb4877928dfd6abd11a159.tar.gz |
Review of new pushed code
Indentation cleanup
client/mysqladmin.cc:
Indentation cleanup
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqladmin.cc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 24cd461b1fa..d390a152fc7 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -832,7 +832,8 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) if (argv[1][0]) { char *pw= argv[1]; - bool old= find_type(argv[0], &command_typelib, 2) == ADMIN_OLD_PASSWORD; + bool old= (find_type(argv[0], &command_typelib, 2) == + ADMIN_OLD_PASSWORD); #ifdef __WIN__ uint pw_len= strlen(pw); if (pw_len > 1 && pw[0] == '\'' && pw[pw_len-1] == '\'') @@ -843,21 +844,29 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) If we don't already know to use an old-style password, see what the server is using */ - if (!old) { - if (mysql_query(mysql, "SHOW VARIABLES LIKE 'old_passwords'")) { + if (!old) + { + if (mysql_query(mysql, "SHOW VARIABLES LIKE 'old_passwords'")) + { my_printf_error(0, "Could not determine old_passwords setting from server; error: '%s'", MYF(ME_BELL),mysql_error(mysql)); return -1; - } else { + } + else + { MYSQL_RES *res= mysql_store_result(mysql); - if (!res) { - my_printf_error(0, "Could not get old_passwords setting from server; error: '%s'", + if (!res) + { + my_printf_error(0, + "Could not get old_passwords setting from " + "server; error: '%s'", MYF(ME_BELL),mysql_error(mysql)); return -1; } - if (!mysql_num_rows(res)) { + if (!mysql_num_rows(res)) old= 1; - } else { + else + { MYSQL_ROW row= mysql_fetch_row(res); old= !strncmp(row[1], "ON", 2); } |