mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 18:09:00 +00:00
lib: Remove zlog_warn from some places in buffer.c
zlog_warn was being used to inform user of impossible situations or for normal operations. Remove these from the code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
807ed4e9c0
commit
07436e2a52
18
lib/buffer.c
18
lib/buffer.c
@ -274,19 +274,12 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
|
|||||||
if (!b->head)
|
if (!b->head)
|
||||||
return BUFFER_EMPTY;
|
return BUFFER_EMPTY;
|
||||||
|
|
||||||
if (height < 1) {
|
if (height < 1)
|
||||||
zlog_warn(
|
|
||||||
"%s called with non-positive window height %d, forcing to 1",
|
|
||||||
__func__, height);
|
|
||||||
height = 1;
|
height = 1;
|
||||||
} else if (height >= 2)
|
else if (height >= 2)
|
||||||
height--;
|
height--;
|
||||||
if (width < 1) {
|
if (width < 1)
|
||||||
zlog_warn(
|
|
||||||
"%s called with non-positive window width %d, forcing to 1",
|
|
||||||
__func__, width);
|
|
||||||
width = 1;
|
width = 1;
|
||||||
}
|
|
||||||
|
|
||||||
/* For erase and more data add two to b's buffer_data count.*/
|
/* For erase and more data add two to b's buffer_data count.*/
|
||||||
if (b->head->next == NULL) {
|
if (b->head->next == NULL) {
|
||||||
@ -334,11 +327,6 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
|
|||||||
{
|
{
|
||||||
iov_alloc *= 2;
|
iov_alloc *= 2;
|
||||||
if (iov != small_iov) {
|
if (iov != small_iov) {
|
||||||
zlog_warn(
|
|
||||||
"%s: growing iov array to %d; "
|
|
||||||
"width %d, height %d, size %lu",
|
|
||||||
__func__, iov_alloc, width, height,
|
|
||||||
(unsigned long)b->size);
|
|
||||||
iov = XREALLOC(MTYPE_TMP, iov,
|
iov = XREALLOC(MTYPE_TMP, iov,
|
||||||
iov_alloc * sizeof(*iov));
|
iov_alloc * sizeof(*iov));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user