Skip to content

Commit d58ff8a

Browse files
committed
Use nullptr explicitly
Address comment from David
1 parent 0fb800c commit d58ff8a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cpp/src/arrow/flight/sql/odbc/tests/tables_test.cc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,24 @@ TYPED_TEST(TablesTest, SQLTablesTestInputData) {
5656

5757
ValidateFetch(this->stmt, SQL_NO_DATA);
5858

59-
// Sizes are nulls
59+
// Sizes are zeros
6060
EXPECT_EQ(SQL_SUCCESS, SQLTables(this->stmt, catalog_name, 0, schema_name, 0,
6161
table_name, 0, table_type, 0));
6262

6363
ValidateFetch(this->stmt, SQL_NO_DATA);
6464

65-
// Values are nulls
66-
EXPECT_EQ(SQL_SUCCESS,
67-
SQLTables(this->stmt, 0, sizeof(catalog_name), 0, sizeof(schema_name), 0,
68-
sizeof(table_name), 0, sizeof(table_type)));
65+
// Names are nulls
66+
EXPECT_EQ(SQL_SUCCESS, SQLTables(this->stmt, nullptr, sizeof(catalog_name), nullptr,
67+
sizeof(schema_name), nullptr, sizeof(table_name),
68+
nullptr, sizeof(table_type)));
6969

7070
ValidateFetch(this->stmt, SQL_SUCCESS);
7171
// Close statement cursor to avoid leaving in an invalid state
7272
SQLFreeStmt(this->stmt, SQL_CLOSE);
7373

74-
// All values and sizes are nulls
75-
EXPECT_EQ(SQL_SUCCESS, SQLTables(this->stmt, 0, 0, 0, 0, 0, 0, 0, 0));
74+
// Names are nulls and sizes are zeros
75+
EXPECT_EQ(SQL_SUCCESS,
76+
SQLTables(this->stmt, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0));
7677

7778
ValidateFetch(this->stmt, SQL_SUCCESS);
7879
}

0 commit comments

Comments
 (0)