summaryrefslogtreecommitdiffstats
path: root/usr.sbin/flowctl
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-02-13 23:57:20 +0000
committerglebius <glebius@FreeBSD.org>2015-02-13 23:57:20 +0000
commita9731f30c8eef0c07813f21884d05d8f12dc1dd9 (patch)
tree763f08ef2ab4ed8d8c0c727769cfc6482949f664 /usr.sbin/flowctl
parent375a1b0d29b16252951e12bfab677805c00e93d4 (diff)
downloadFreeBSD-src-a9731f30c8eef0c07813f21884d05d8f12dc1dd9.zip
FreeBSD-src-a9731f30c8eef0c07813f21884d05d8f12dc1dd9.tar.gz
Use less ugly code to allocate buffer of SORCVBUF_SIZE.
Diffstat (limited to 'usr.sbin/flowctl')
-rw-r--r--usr.sbin/flowctl/flowctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/flowctl/flowctl.c b/usr.sbin/flowctl/flowctl.c
index 531b988..0c7539a 100644
--- a/usr.sbin/flowctl/flowctl.c
+++ b/usr.sbin/flowctl/flowctl.c
@@ -222,10 +222,12 @@ ctl_show(int argc, char **argv)
static void
do_show(int version, void (*func)(struct ngnf_show_header *))
{
- struct ng_mesg ng_mesg[SORCVBUF_SIZE];
+ char buf[SORCVBUF_SIZE];
+ struct ng_mesg *ng_mesg;
struct ngnf_show_header req, *resp;
int token, nread;
+ ng_mesg = (struct ng_mesg *)buf;
req.version = version;
req.hash_id = req.list_id = 0;
OpenPOWER on IntegriCloud