diff --git a/cpp/src/arrow/c/bridge.cc b/cpp/src/arrow/c/bridge.cc index 1781931d95db7..7acd6e69f032b 100644 --- a/cpp/src/arrow/c/bridge.cc +++ b/cpp/src/arrow/c/bridge.cc @@ -588,8 +588,11 @@ struct ArrayExporter { export_.buffers_.resize(n_buffers); std::transform(buffers_begin, data->buffers.end(), export_.buffers_.begin(), [](const std::shared_ptr& buffer) -> const void* { - return buffer ? (device_interface ? reinterpret_cast(buffer->address()) : buffer->data()) - : nullptr; + return buffer + ? (device_interface + ? reinterpret_cast(buffer->address()) + : buffer->data()) + : nullptr; }); if (need_variadic_buffer_sizes) {