Function

FwupdPluginmemcmp_safe

Declaration [src]

gboolean
fu_memcmp_safe (
  const guint8* buf1,
  gsize buf1_sz,
  gsize buf1_offset,
  const guint8* buf2,
  gsize buf2_sz,
  gsize buf2_offset,
  gsize n,
  GError** error
)

Description [src]

Compares the buffers for equality.

Available since:1.8.2

Parameters

buf1 const guint8*
 

A buffer.

 The data is owned by the caller of the function.
buf1_sz gsize
 

Sizeof buf1

buf1_offset gsize
 

Offset into buf1

buf2 const guint8*
 

Another buffer.

 The data is owned by the caller of the function.
buf2_sz gsize
 

Sizeof buf2

buf2_offset gsize
 

Offset into buf1

n gsize
 

Number of bytes to compare from buf1+buf1_offset from.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if buf1 and buf2 are identical.