diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2004-08-23 20:55:09 +0500 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2004-08-23 20:55:09 +0500 |
commit | 78088d91649df55c14c5bdba4afe4bb7b133e350 (patch) | |
tree | 39ffd43c0467ce93ae54e91244988e1c62054546 /client | |
parent | 412d05510bb372bf264a091a585b9c0856896b6e (diff) | |
download | mariadb-git-78088d91649df55c14c5bdba4afe4bb7b133e350.tar.gz |
fixed a Bug #4998 "--protocol doesn't reject bad values"
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 3 | ||||
-rw-r--r-- | client/mysqladmin.c | 2 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 3 | ||||
-rw-r--r-- | client/mysqlcheck.c | 2 | ||||
-rw-r--r-- | client/mysqldump.c | 3 | ||||
-rw-r--r-- | client/mysqlimport.c | 2 | ||||
-rw-r--r-- | client/mysqlshow.c | 2 |
7 files changed, 7 insertions, 10 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 015c168cea7..02198cc6fd9 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -753,8 +753,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_nopager= 1; case OPT_MYSQL_PROTOCOL: { - if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == - ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); diff --git a/client/mysqladmin.c b/client/mysqladmin.c index aaed101a83e..3c7a870a309 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -249,7 +249,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case OPT_MYSQL_PROTOCOL: { - if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 97746a52b39..d1411a67b68 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -633,8 +633,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case OPT_MYSQL_PROTOCOL: { - if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) == - ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 78e82e670f8..50133ac4059 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -271,7 +271,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'V': print_version(); exit(0); case OPT_MYSQL_PROTOCOL: { - if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); diff --git a/client/mysqldump.c b/client/mysqldump.c index dfac9ea0e7c..6015fd00ffd 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -582,8 +582,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } case (int) OPT_MYSQL_PROTOCOL: { - if ((opt_protocol= find_type(argument, &sql_protocol_typelib, 0)) - == ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); diff --git a/client/mysqlimport.c b/client/mysqlimport.c index ccf7fd9880d..3db13519a46 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -203,7 +203,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), #endif case OPT_MYSQL_PROTOCOL: { - if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); diff --git a/client/mysqlshow.c b/client/mysqlshow.c index d9e2a1fa92a..285b229550f 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -268,7 +268,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case OPT_MYSQL_PROTOCOL: { - if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + if (!(opt_protocol= find_type(argument, &sql_protocol_typelib,0))) { fprintf(stderr, "Unknown option to protocol: %s\n", argument); exit(1); |