mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 04:33:08 +00:00
trivial: Require <string.h> for strlen() and memcpy()
This commit is contained in:
parent
3a0ee309d5
commit
a14de30153
@ -6,6 +6,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fwupd-enums-private.h"
|
||||
#include "fwupd-plugin-private.h"
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fwupd-common-private.h"
|
||||
#include "fwupd-enums-private.h"
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
#include "fu-dfu-firmware.h"
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
#include "fu-fmap-firmware.h"
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
|
||||
#include "fu-bcm57xx-common.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <glib/gstdio.h>
|
||||
#ifdef HAVE_ETHTOOL_H
|
||||
#include <linux/ethtool.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
#include "fu-common-version.h"
|
||||
#include "fu-ccgx-dmc-common.h"
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
#include "fu-common-version.h"
|
||||
#include "fu-firmware-common.h"
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-chunk.h"
|
||||
|
||||
#include "fu-ccgx-common.h"
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <fwupd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
#include "fu-goodixmoc-common.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-firmware-common.h"
|
||||
|
||||
#include "fu-jabra-device.h"
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
|
||||
#include "fu-synaptics-cxaudio-firmware.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "fu-common.h"
|
||||
|
@ -56,12 +56,15 @@ fu_vli_usbhub_device_i2c_write (FuVliUsbhubDevice *self,
|
||||
GError **error)
|
||||
{
|
||||
GUsbDevice *usb_device = fu_usb_device_get_dev (FU_USB_DEVICE (self));
|
||||
g_autofree guint8 *buf = g_malloc0 (datasz + 2);
|
||||
gsize bufsz = datasz + 2;
|
||||
g_autofree guint8 *buf = g_malloc0 (bufsz);
|
||||
|
||||
buf[0] = slave_addr;
|
||||
buf[1] = sub_addr;
|
||||
memcpy (buf + 2, data, datasz);
|
||||
|
||||
if (!fu_memcpy_safe (buf, bufsz, 0x2, /* dst */
|
||||
data, datasz, 0x0, /* src */
|
||||
datasz, error))
|
||||
return FALSE;
|
||||
if (g_getenv ("FWUPD_VLI_USBHUB_VERBOSE") != NULL)
|
||||
fu_common_dump_raw (G_LOG_DOMAIN, "I2cWriteData", buf, datasz + 2);
|
||||
if (!g_usb_device_control_transfer (usb_device,
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define G_LOG_DOMAIN "FuKeyring"
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fwupd-error.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user