Date: Fri, 13 Feb 2015 23:57:20 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278737 - head/usr.sbin/flowctl Message-ID: <201502132357.t1DNvKda075915@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Feb 13 23:57:20 2015 New Revision: 278737 URL: https://svnweb.freebsd.org/changeset/base/278737 Log: Use less ugly code to allocate buffer of SORCVBUF_SIZE. Modified: head/usr.sbin/flowctl/flowctl.c Modified: head/usr.sbin/flowctl/flowctl.c ============================================================================== --- head/usr.sbin/flowctl/flowctl.c Fri Feb 13 23:43:59 2015 (r278736) +++ head/usr.sbin/flowctl/flowctl.c Fri Feb 13 23:57:20 2015 (r278737) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502132357.t1DNvKda075915>