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.
This commit is contained in:
D'Arcy J.M. Cain 2001-05-27 19:06:20 +00:00
parent 73d1040bd9
commit 2bc1c14ab0
1 changed files with 3 additions and 3 deletions

View File

@ -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);