---
name: "swap_buf_le16"
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/swap_buf_le16"
---

# swap\_buf\_le16(9)

swap halves of 16-bit words in place

## NAME

swap\_buf\_le16 - swap halves of 16-bit words in place

## SYNOPSIS

**void swap\_buf\_le16(u16 \*** *buf***, unsigned int** *buf\_words***);**

## ARGUMENTS

*buf*

Buffer to swap

*buf\_words*

Number of 16-bit words in buffer.

## DESCRIPTION

Swap halves of 16-bit words if needed to convert from little-endian byte order to native cpu byte order, or vice-versa.

LOCKING: Inherited from caller.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
