Date: Sat, 24 Jun 2017 12:54:23 -0700 From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com> To: Glen Barber <gjb@FreeBSD.org> Cc: Conrad Meyer <cem@freebsd.org>, Maxim Sobolev <sobomax@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320277 - head/usr.bin/mkuzip Message-ID: <B1262445-B114-4687-AAF8-25324A4982A9@gmail.com> In-Reply-To: <20170623235139.GA69426@FreeBSD.org> References: <201706231739.v5NHd05x039900@repo.freebsd.org> <CAG6CVpXN2QQVRdqyv5ED3X%2BRCW6sK10_fy9%2BX7hZ8kMRNf=9dA@mail.gmail.com> <20170623235139.GA69426@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 23, 2017, at 16:51, Glen Barber <gjb@FreeBSD.org> wrote: >=20 > On Fri, Jun 23, 2017 at 03:54:35PM -0700, Conrad Meyer wrote: >>> @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) >>> ffd =3D open(statfsbuf.f_mntfromname, O_RDONLY); >>> if (ffd < 0) { >>> warn("open(%s, O_RDONLY)", = statfsbuf.f_mntfromname); >>> + close(ffd); >>=20 >> This one is wrong for obvious reasons. >>=20 >=20 > It isn't obvious to me. :) open failed, so closing ffd =3D=3D -1 is a programming error (but = admittedly, pretty benign). -Ngie --Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZTsNwAAoJEPWDqSZpMIYVbZMP/iG9rupG6A1N+NMah71sYrjb 6jsgJWN85OvN5ZncNBfNg85Yru1qENQbS863WlJ4k7yRVrXWqp3Sj18XNu8lpyKR P0YdQKgGLVI0pDpaaux5OYTYsjdDNU6M+z9QMdmDHVeJtnMEZKHrZwf7xzMGnJZu q6F5dMisVS8HTTXol5R/0Ym/nQgp/6B+5Xj2Z5bpsI4x1pYtI0wuEN0CaSO1WWzq hN1Fgbxgp9K+fBmFuzU5F9x5J5ryTSLgTD4k8AhLCzrY780wXnUyOf6idrrKowF4 T8G9c7JR1B8dTqniVbNYB6dtiMB3z/lzc8FG5FosDIIaEJvFTTyvGgjLj/Y3VzXK Fqthda9DkGGuZceec9EqyDNS9eOWD9uaOJQV+vffyuSQ4V83TtXNyOsqudw4onkb 5Vn9dMemCm5dyEpSuns+SDAMeFf5JJtAUcoyq+SkBWZqIHbtpsaNELU7MGfVTfNj DkrvMDRNycVU1TXlMAfbvdlzykW+2Jo5RJ0EOY4gRukneARI5p2dEOKQii9Ox5aM tNoEfu4Ykp6gP+WciRKOGDH1Bz2ar8/XkUVGcsXsin8lLHqmyZZGCRhnidBsqYQs Vz89II6vR90ogZXNr7Bxv6bKR9pgY03Vu62C8FtxiiRG1kpI0cD1hSPNp3pVCmtH cDhtf7aXR9fiuHzHU+gZ =48rq -----END PGP SIGNATURE----- --Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B1262445-B114-4687-AAF8-25324A4982A9>