diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2015-03-03 09:08:05 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-08 18:48:21 +0200 |
commit | f03db93b27bc4221712a2f7ef6a123a144e5884c (patch) | |
tree | bb275f9c7f4855c606dc94c629c9b329311618ec /lib/buffer.c | |
parent | lib: use const consistently for zserv path (diff) | |
download | frr-f03db93b27bc4221712a2f7ef6a123a144e5884c.tar.xz frr-f03db93b27bc4221712a2f7ef6a123a144e5884c.zip |
lib, vtysh: reduce unneccessary C extension usage
We're only supporting GCC, Clang and ICC; but there's no reason to use
nonstandard C constructs if they don't actually provide any benefit.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 71f55f38cb3dd804176e7f382f52b75ddcd437de)
Diffstat (limited to 'lib/buffer.c')
-rw-r--r-- | lib/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/buffer.c b/lib/buffer.c index b689549ed..ee9310100 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -148,7 +148,7 @@ buffer_add (struct buffer *b) { struct buffer_data *d; - d = XMALLOC(MTYPE_BUFFER_DATA, offsetof(struct buffer_data, data[b->size])); + d = XMALLOC(MTYPE_BUFFER_DATA, offsetof(struct buffer_data, data) + b->size); d->cp = d->sp = 0; d->next = NULL; |