Date: Mon, 2 Mar 2015 20:14:57 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r279541 - user/dchagin/lemul/sys/fs/pseudofs Message-ID: <201503022014.t22KEvac068829@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Mon Mar 2 20:14:56 2015 New Revision: 279541 URL: https://svnweb.freebsd.org/changeset/base/279541 Log: Avoid using of an uninitialized variable. Modified: user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Modified: user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Mon Mar 2 20:13:49 2015 (r279540) +++ user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Mon Mar 2 20:14:56 2015 (r279541) @@ -904,12 +904,13 @@ pfs_readdir(struct vop_readdir_args *va) /* PFS_DELEN was picked to fit PFS_NAMLEN */ if (pn->pn_type != pfstype_procdir && - pn->pn_type != pfstype_fdlink) + pn->pn_type != pfstype_fdlink) { for (i = 0; i < PFS_NAMELEN - 1 && pn->pn_name[i] != '\0'; ++i) pfsent->entry.d_name[i] = pn->pn_name[i]; - pfsent->entry.d_name[i] = 0; - pfsent->entry.d_namlen = i; + pfsent->entry.d_name[i] = 0; + pfsent->entry.d_namlen = i; + } switch (pn->pn_type) { case pfstype_procdir: KASSERT(p != NULL,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503022014.t22KEvac068829>