diff options
author | vva@eagle.mysql.r18.ru <> | 2004-08-24 20:13:31 +0500 |
---|---|---|
committer | vva@eagle.mysql.r18.ru <> | 2004-08-24 20:13:31 +0500 |
commit | ffacc77f225fcab8b347bf61735fef09296bab04 (patch) | |
tree | 82f89fe2bd46076041d452986fa0f42c286e8211 /sql-common | |
parent | 237615bc53e452b80cd9d7e8da2dd5cdb5e3bab1 (diff) | |
download | mariadb-git-ffacc77f225fcab8b347bf61735fef09296bab04.tar.gz |
more accurate processing of find_type result
(Bug #4998 --protocol doesn't reject bad values)
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 68878df50e8..43377bb09b1 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1057,9 +1057,8 @@ void mysql_read_default_options(struct st_mysql_options *options, options->max_allowed_packet= atoi(opt_arg); break; case 28: /* protocol */ - if ((options->protocol = find_type(opt_arg, - &sql_protocol_typelib,0)) - == ~(ulong) 0) + if ((options->protocol= find_type(opt_arg, + &sql_protocol_typelib,0)) <= 0) { fprintf(stderr, "Unknown option to protocol: %s\n", opt_arg); exit(1); |