summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorserg@serg.mylan <>2003-09-03 16:31:01 +0200
committerserg@serg.mylan <>2003-09-03 16:31:01 +0200
commit2317fa3ba5312dd6fde14c89930ee35c53b6e3fe (patch)
tree07d9136ad04a386e819da89216ac0aa313378d85 /libmysql
parent7d2b0a0ce756f22befd66a0eaa0b22df3cdc1e5f (diff)
downloadmariadb-git-2317fa3ba5312dd6fde14c89930ee35c53b6e3fe.tar.gz
C cleanups
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 67576a961ef..0a9e1114fc5 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -594,6 +594,8 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
const char *passwd, const char *db)
{
char buff[512],*end=buff;
+ NET *net= &mysql->net;
+ ulong pkt_length;
DBUG_ENTER("mysql_change_user");
if (!user)
@@ -627,8 +629,7 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
/* Write authentication package */
simple_command(mysql,COM_CHANGE_USER, buff,(ulong) (end-buff),1);
- NET *net= &mysql->net;
- ulong pkt_length= net_safe_read(mysql);
+ pkt_length= net_safe_read(mysql);
if (pkt_length == packet_error)
goto error;