Skip to content

Commit fb5961f

Browse files
committed
Fix incorrect format placeholders
Also choose better types for the underlying variables to make this more consistent.
1 parent b2265d3 commit fb5961f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/pageinspect/heapfuncs.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ tuple_data_split(PG_FUNCTION_ARGS)
455455
*/
456456
if (t_infomask & HEAP_HASNULL)
457457
{
458-
int bits_str_len;
459-
int bits_len;
458+
size_t bits_str_len;
459+
size_t bits_len;
460460

461461
bits_len = BITMAPLEN(t_infomask2 & HEAP_NATTS_MASK) * BITS_PER_BYTE;
462462
if (!t_bits_str)
@@ -468,7 +468,7 @@ tuple_data_split(PG_FUNCTION_ARGS)
468468
if (bits_len != bits_str_len)
469469
ereport(ERROR,
470470
(errcode(ERRCODE_DATA_CORRUPTED),
471-
errmsg("unexpected length of t_bits string: %u, expected %u",
471+
errmsg("unexpected length of t_bits string: %zu, expected %zu",
472472
bits_str_len, bits_len)));
473473

474474
/* do the conversion */

0 commit comments

Comments
 (0)