Date: Sun, 13 Mar 2016 19:50:17 +0000 (UTC) From: Jakub Wojciech Klama <jceel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296808 - head/usr.sbin/ctld Message-ID: <201603131950.u2DJoHBH035698@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jceel Date: Sun Mar 13 19:50:17 2016 New Revision: 296808 URL: https://svnweb.freebsd.org/changeset/base/296808 Log: Check value returned from ucl_parser_add_file(). Reviewed by: trasz Approved by: trasz (mentor) MFC after: 1 month Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/ctld/uclparse.c Modified: head/usr.sbin/ctld/uclparse.c ============================================================================== --- head/usr.sbin/ctld/uclparse.c Sun Mar 13 19:42:59 2016 (r296807) +++ head/usr.sbin/ctld/uclparse.c Sun Mar 13 19:50:17 2016 (r296808) @@ -886,9 +886,8 @@ uclparse_conf(struct conf *newconf, cons conf = newconf; parser = ucl_parser_new(0); - ucl_parser_add_file(parser, path); - if (ucl_parser_get_error(parser)) { + if (!ucl_parser_add_file(parser, path)) { log_warn("unable to parse configuration file %s: %s", path, ucl_parser_get_error(parser)); return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603131950.u2DJoHBH035698>