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:

committed by
Chromium LUCI CQ

parent
426e4b547f
commit
b075e1978c
base
chrome
browser
ash
policy
reporting
web_applications
os_integration
renderer
chromecast/media/cma/backend/alsa
chromeos
ash
components
dbus
printing
components
metrics
serialization
power_metrics
ukm
variations
field_trial_config
content
crypto
device/gamepad
media/filters
net
disk_cache
http
quic
socket
services/device/hid
testing/libfuzzer/fuzzilli
third_party/blink/renderer
core
modules
media_capabilities
platform
image-decoders
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user