Commit 2bc1c14a authored by D'Arcy J.M. Cain's avatar D'Arcy J.M. Cain

Changed use of macros for extracting information. According to comments

in c.h we should be using the visible structure.  We should only see
de-TOASTed values in this program.  The old method refused to compile
because the length macro was no longer an lvalue.
parent 73d1040b
......@@ -4,7 +4,7 @@
* darcy@druid.net
* http://www.druid.net/darcy/
*
* $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.c,v 1.1 2001/05/03 12:32:13 darcy Exp $
* $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.c,v 1.2 2001/05/27 19:06:20 darcy Exp $
* best viewed with tabs set to 4
*/
......@@ -135,8 +135,8 @@ chkpass_rout(chkpass *password)
if ((result = (text *) palloc(VARHDRSZ + 16)) != NULL)
{
VARSIZE(result) = VARHDRSZ + strlen(password->password);
memcpy(VARDATA(result), password->password, strlen(password->password));
result->vl_len = VARHDRSZ + strlen(password->password);
memcpy(result->vl_dat, password->password, strlen(password->pass
}
return (result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment