Permalink
Browse files

No need to use strlen() with StringInfoData.

  • Loading branch information...
1 parent 7e4f811 commit d402a73e4272ac90e27a90ad038d3b3be20d21c7 @schmiddy schmiddy committed Nov 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/pgut/pgut-spi.c
View
@@ -67,7 +67,7 @@ execute_with_format(int expected, const char *format, ...)
appendStringInfoVA_s(&sql, format, ap);
va_end(ap);
- if (strlen(sql.data) == 0)
+ if (sql.len == 0)
elog(WARNING, "execute_with_format(%s)", format);
ret = SPI_exec(sql.data, 0);
if EXEC_FAILED(ret, expected)

0 comments on commit d402a73

Please sign in to comment.