88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.108 2003/11/30 20:55:09 joe Exp $
11+ * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.109 2003/12/19 04:56:41 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -2230,11 +2230,11 @@ array_to_text(PG_FUNCTION_ARGS)
22302230Datum
22312231to_hex32 (PG_FUNCTION_ARGS )
22322232{
2233- static char digits []= "0123456789abcdef" ;
2234- char buf [32 ];/* bigger than needed, but reasonable */
2235- char * ptr ;
2233+ uint32 value = (uint32 )PG_GETARG_INT32 (0 );
22362234text * result_text ;
2237- int32 value = PG_GETARG_INT32 (0 );
2235+ char * ptr ;
2236+ const char * digits = "0123456789abcdef" ;
2237+ char buf [32 ];/* bigger than needed, but reasonable */
22382238
22392239ptr = buf + sizeof (buf )- 1 ;
22402240* ptr = '\0' ;
@@ -2256,11 +2256,11 @@ to_hex32(PG_FUNCTION_ARGS)
22562256Datum
22572257to_hex64 (PG_FUNCTION_ARGS )
22582258{
2259- static char digits []= "0123456789abcdef" ;
2260- char buf [32 ];/* bigger than needed, but reasonable */
2261- char * ptr ;
2259+ uint64 value = (uint64 )PG_GETARG_INT64 (0 );
22622260text * result_text ;
2263- int64 value = PG_GETARG_INT64 (0 );
2261+ char * ptr ;
2262+ const char * digits = "0123456789abcdef" ;
2263+ char buf [32 ];/* bigger than needed, but reasonable */
22642264
22652265ptr = buf + sizeof (buf )- 1 ;
22662266* ptr = '\0' ;