diff options
| author | David Lamparter <equinox@diac24.net> | 2018-08-23 18:04:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-23 18:04:12 +0200 |
| commit | 02e8981e2e0b9a8a34df43efd979e9fdc6773f6d (patch) | |
| tree | 3ff762e709e28d6490b4386787b216c4092e09d2 /lib/buffer.c | |
| parent | 82b410b0453f2269c5b469203db0f61b6541bcff (diff) | |
| parent | 03548ae8180f3e73468ce577368a9239e50ec848 (diff) | |
Merge pull request #2855 from donaldsharp/bgp_tough
Various Cleanups
Diffstat (limited to 'lib/buffer.c')
| -rw-r--r-- | lib/buffer.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/buffer.c b/lib/buffer.c index 0292c85dac..1799c6b94f 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -274,19 +274,12 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width, if (!b->head) return BUFFER_EMPTY; - if (height < 1) { - zlog_warn( - "%s called with non-positive window height %d, forcing to 1", - __func__, height); + if (height < 1) height = 1; - } else if (height >= 2) + else if (height >= 2) height--; - if (width < 1) { - zlog_warn( - "%s called with non-positive window width %d, forcing to 1", - __func__, width); + if (width < 1) width = 1; - } /* For erase and more data add two to b's buffer_data count.*/ 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; 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_alloc * sizeof(*iov)); } else { |
