---
name: "xdr_buf_trim"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/xdr_buf_trim"
---

# xdr\_buf\_trim(9)

lop at most “len” bytes off the end of “buf”

## NAME

xdr\_buf\_trim - lop at most “len” bytes off the end of “buf”

## SYNOPSIS

**void xdr\_buf\_trim(struct xdr\_buf \*** *buf***, unsigned int** *len***);**

## ARGUMENTS

*buf*

buf to be trimmed

*len*

number of bytes to reduce “buf” by

## DESCRIPTION

Trim an xdr\_buf by the given number of bytes by fixing up the lengths. Note that it's possible that we'll trim less than that amount if the xdr\_buf is too small, or if (for instance) it's all in the head and the parser has already read too far into it.

## COPYRIGHT
