Skip to content

Commit 378a314

Browse files
committed
Use nullptr explicitly
1 parent edb612a commit 378a314

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,22 @@ TYPED_TEST(ColumnsTest, SQLColumnsTestInputData) {
139139
sizeof(column_name)));
140140
ValidateFetch(this->stmt, SQL_NO_DATA);
141141

142-
// Sizes are nulls
142+
// Sizes are zeros
143143
EXPECT_EQ(SQL_SUCCESS, SQLColumns(this->stmt, catalog_name, 0, schema_name, 0,
144144
table_name, 0, column_name, 0));
145145
ValidateFetch(this->stmt, SQL_NO_DATA);
146146

147-
// Values are nulls
148-
EXPECT_EQ(SQL_SUCCESS,
149-
SQLColumns(this->stmt, 0, sizeof(catalog_name), 0, sizeof(schema_name), 0,
150-
sizeof(table_name), 0, sizeof(column_name)));
147+
// Names are nulls
148+
EXPECT_EQ(SQL_SUCCESS, SQLColumns(this->stmt, nullptr, sizeof(catalog_name), nullptr,
149+
sizeof(schema_name), nullptr, sizeof(table_name),
150+
nullptr, sizeof(column_name)));
151151
ValidateFetch(this->stmt, SQL_SUCCESS);
152152
// Close statement cursor to avoid leaving in an invalid state
153153
SQLFreeStmt(this->stmt, SQL_CLOSE);
154154

155-
// All values and sizes are nulls
156-
EXPECT_EQ(SQL_SUCCESS, SQLColumns(this->stmt, 0, 0, 0, 0, 0, 0, 0, 0));
155+
// Names are nulls and sizes are zeros
156+
EXPECT_EQ(SQL_SUCCESS,
157+
SQLColumns(this->stmt, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0));
157158
ValidateFetch(this->stmt, SQL_SUCCESS);
158159
}
159160

0 commit comments

Comments
 (0)