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

# list\_first\_entry(9)

get the first element from a list

## NAME

list\_first\_entry - get the first element from a list

## SYNOPSIS

**list\_first\_entry(***ptr***,** *type***,** *member***);**

## ARGUMENTS

*ptr*

the list head to take the element from.

*type*

the type of the struct this is embedded in.

*member*

the name of the list\_head within the struct.

## DESCRIPTION

Note, that list is expected to be not empty.

## COPYRIGHT
