aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD'Arcy J.M. Cain <darcy@druid.net>2001-05-27 19:06:20 +0000
committerD'Arcy J.M. Cain <darcy@druid.net>2001-05-27 19:06:20 +0000
commit2bc1c14ab0d68dc7dc2c8f426e10540836e4f41e (patch)
tree5a43381a854fe3734f405aced8508339c0aff6e8
parent73d1040bd924470e8a9228542c9ab8976b61a2f2 (diff)
downloadpostgresql-2bc1c14ab0d68dc7dc2c8f426e10540836e4f41e.tar.gz
postgresql-2bc1c14ab0d68dc7dc2c8f426e10540836e4f41e.zip
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.
-rw-r--r--contrib/chkpass/chkpass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/chkpass/chkpass.c b/contrib/chkpass/chkpass.c
index 46080cc07ad..46914f40a26 100644
--- a/contrib/chkpass/chkpass.c
+++ b/contrib/chkpass/chkpass.c
@@ -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);