Date: Thu, 18 May 2017 07:47:03 +0300 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318400 - head/sbin/ipfw Message-ID: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru> In-Reply-To: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> References: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP Content-Type: multipart/mixed; boundary="Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf"; protected-headers="v1" From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru> Subject: Re: svn commit: r318400 - head/sbin/ipfw References: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> --Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18.05.2017 03:49, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: ae >> Date: Wed May 17 10:56:22 2017 >> New Revision: 318400 >> URL: https://svnweb.freebsd.org/changeset/base/318400 >> >> Log: >> Allow zero port specification in table entries with type flow. >> =20 >> PR: 217620 >> MFC after: 1 week >> >> Modified: >> head/sbin/ipfw/tables.c >> >> Modified: head/sbin/ipfw/tables.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sbin/ipfw/tables.c Wed May 17 09:04:09 2017 (r318399) >> +++ head/sbin/ipfw/tables.c Wed May 17 10:56:22 2017 (r318400) >> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj >> if ((p =3D strchr(arg, ',')) !=3D NULL) >> *p++ =3D '\0'; >> =20 >> - if ((port =3D htons(strtol(arg, NULL, 10))) =3D=3D 0) { >> + port =3D htons(strtol(arg, &pp, 10)); > ^^^ > Can this be converted to a sizeof(foo) somehow? > Constants like this are typically bad style and lead to bugs. This means that decimal number is expected in the string. Not sure what bugs this can lead to. --=20 WBR, Andrey V. Elsukov --Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf-- --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlkdJ0cACgkQAcXqBBDI oXrJmQgAsDjmNc/WgLSIXEYc8jSmWJc9hvHmKVYwITYNUXHPk6EcKTF7fKb6tINv kytgFF7Bd3ZlrkqBrXgXlpdOnNac9ZzUI3UfC3qoqEbrKCWQ624kL54l3RE0w1f9 k2RZBJ+CvL1XLriu03U8PCtCpNyXbl6LCK4IcBb+sPj26TvFqNekdBrS+sp11eSr +g1biZ6ckFHcKn/xqFbOk3V7MbKSTS1tzsGFovEIbctvusi4hTd6wAYH4i5C7J7O sICNA279K1A2YXCAQLvRQjQvl4U/jMEEea6EgLapfCMD25XkjiexmSiVaYoD6piL asy2P8jVeykpw47udjt6zKtOnKntUA== =9dAA -----END PGP SIGNATURE----- --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?72e5d765-dfd5-dd65-b8f1-9d5524cde366>