### Function

# FwupdPlugin bytes_align

#### Declaration [src]

    GBytes*
    fu_bytes_align (
      GBytes* bytes,
      gsize blksz,
      gchar padval
    )

#### Description [src]

Aligns a block of memory to `blksize` using the `padval` value; if the block is already aligned then the original `bytes` is returned.

Available since: | 1.8.2

#### Parameters

`bytes` | `GBytes`
| Data blob.
| The data is owned by the caller of the function.
`blksz` | `gsize`
| Block size in bytes.
`padval` | `gchar`
| The byte used to pad the byte buffer.

#### Return value

Returns: | `GBytes`
| A `GBytes`, possibly `bytes`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.