diff options
author | oshogbo <oshogbo@FreeBSD.org> | 2015-08-11 17:41:32 +0000 |
---|---|---|
committer | oshogbo <oshogbo@FreeBSD.org> | 2015-08-11 17:41:32 +0000 |
commit | d2f6c2a9e32cd71d8a617018ffdd728fe1ea24a2 (patch) | |
tree | 8fd637b0318e4d948d4dfeb6cafc93f0bd9d6c33 /share | |
parent | 8a5a3af09a730c4137b206e74dd59525cc3fef8b (diff) | |
download | FreeBSD-src-d2f6c2a9e32cd71d8a617018ffdd728fe1ea24a2.zip FreeBSD-src-d2f6c2a9e32cd71d8a617018ffdd728fe1ea24a2.tar.gz |
Make the nvlist_next(9) function handle NULL pointer variable.
This simplifies removing the first element from nvlist.
Reviewed by: AllanJude
Approved by: pjd (mentor)
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/nv.9 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/share/man/man9/nv.9 b/share/man/man9/nv.9 index 8c4bb20..e3d7080 100644 --- a/share/man/man9/nv.9 +++ b/share/man/man9/nv.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2015 +.Dd Aug 11, 2015 .Dt NV 9 .Os .Sh NAME @@ -410,6 +410,16 @@ The argument can be NULL. Elements may not be removed from the nvlist while traversing it. The nvlist must not be in error state. +Note that +.Fn nvlist_next +will handle +.Va cookiep +being set to +.Dv NULL . +In this case first element is returned or +.Dv NULL +if nvlist is empty. +This behavior simplifies removing the first element from the list. .Pp The .Fn nvlist_exists |