Date: Mon, 26 Dec 2016 19:27:12 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310614 - head/usr.sbin/jail Message-ID: <201612261927.uBQJRCr6067360@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Mon Dec 26 19:27:12 2016 New Revision: 310614 URL: https://svnweb.freebsd.org/changeset/base/310614 Log: Don't assign rtjp twice. Reported by: clang static analyzer MFC after: 2 weeks Modified: head/usr.sbin/jail/jail.c Modified: head/usr.sbin/jail/jail.c ============================================================================== --- head/usr.sbin/jail/jail.c Mon Dec 26 19:26:40 2016 (r310613) +++ head/usr.sbin/jail/jail.c Mon Dec 26 19:27:12 2016 (r310614) @@ -806,8 +806,7 @@ rdtun_params(struct cfjail *j, int dofai if (jailparam_get(rtparams, nrt, bool_param(j->intparams[IP_ALLOW_DYING]) ? JAIL_DYING : 0) > 0) { rtjp = rtparams + 1; - for (jp = j->jp, rtjp = rtparams + 1; rtjp < rtparams + nrt; - jp++) { + for (jp = j->jp; rtjp < rtparams + nrt; jp++) { if (JP_RDTUN(jp) && strcmp(jp->jp_name, "jid")) { if (!((jp->jp_flags & (JP_BOOL | JP_NOBOOL)) && jp->jp_valuelen == 0 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612261927.uBQJRCr6067360>