0

Convert some "unsafe" make_span() calls to span_from_ref()

This will facilitate removing unsafe_buffer usage in the future.

Fully automated change.

Change-Id: I0d5f0369fe002a61d6da83db807612cf6a51c064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5758178
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1336912}
This commit is contained in:
Tom Sepez
2024-08-03 01:54:40 +00:00
committed by Chromium LUCI CQ
parent 426e4b547f
commit b075e1978c
38 changed files with 131 additions and 131 deletions
base
chrome
chromecast/media/cma/backend/alsa
chromeos
ash
components
printing
components
content
crypto
device/gamepad
media/filters
net
services/device/hid
testing/libfuzzer/fuzzilli
third_party/blink/renderer
core
frame
scheduler_integration_tests
modules
media_capabilities
platform

@ -123,7 +123,7 @@ EnergyMetricsProviderLinux::CaptureMetrics() {
uint64_t absolute_energy;
if (!base::ReadFromFD(
event.fd.get(),
base::as_writable_chars(base::make_span(&absolute_energy, 1u)))) {
base::as_writable_chars(base::span_from_ref(absolute_energy)))) {
LOG(ERROR) << "Failed to read absolute energy of " << event.metric_type;
continue;
}