Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2bc1c14

Browse files
committed
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.
1 parent 73d1040 commit 2bc1c14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/chkpass/chkpass.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* darcy@druid.net
55
* http://www.druid.net/darcy/
66
*
7-
* $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.c,v 1.1 2001/05/03 12:32:13 darcy Exp $
7+
* $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.c,v 1.2 2001/05/27 19:06:20 darcy Exp $
88
* best viewed with tabs set to 4
99
*/
1010

@@ -135,8 +135,8 @@ chkpass_rout(chkpass *password)
135135

136136
if ((result = (text *) palloc(VARHDRSZ + 16)) != NULL)
137137
{
138-
VARSIZE(result) = VARHDRSZ + strlen(password->password);
139-
memcpy(VARDATA(result), password->password, strlen(password->password));
138+
result->vl_len = VARHDRSZ + strlen(password->password);
139+
memcpy(result->vl_dat, password->password, strlen(password->pass
140140
}
141141

142142
return (result);

0 commit comments

Comments
 (0)