Skip to content

Commit d402a73

Browse files
committed
No need to use strlen() with StringInfoData.
1 parent 7e4f811 commit d402a73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pgut/pgut-spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ execute_with_format(int expected, const char *format, ...)
6767
appendStringInfoVA_s(&sql, format, ap);
6868
va_end(ap);
6969

70-
if (strlen(sql.data) == 0)
70+
if (sql.len == 0)
7171
elog(WARNING, "execute_with_format(%s)", format);
7272
ret = SPI_exec(sql.data, 0);
7373
if EXEC_FAILED(ret, expected)

0 commit comments

Comments
 (0)