]> git.proxmox.com Git - mirror_frr.git/commit
lib: add ringbuf_peek()
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 26 Dec 2017 23:47:19 +0000 (18:47 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 26 Dec 2017 23:50:56 +0000 (18:50 -0500)
commita5080622b2de7c09393daa208a56606c068db1f3
treeb4b4a8077fbfc45fbb1964686028f028eb097eca
parent5318d8963816f607e8ab648eb17c784617b90270
lib: add ringbuf_peek()

Peek functionality for ring buffers and associated tests.

Also:
* Slight optimization to avoid 0-byte memcpy() by changing > to >=
* Add rv checks for some ringbuf_[put|get] calls that were missing them
  in the test

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/ringbuf.c
lib/ringbuf.h
tests/lib/test_ringbuf.c