Subject: Re: rcp patch
To: None <hypnosses@pulltheplug.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-userlevel
Date: 06/08/2006 23:26:26
--GTGEtWEe6jD60dxL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 08, 2006 at 01:01:23PM -0700, hypnosses@pulltheplug.org wrote:
> heres a little patch i wrote to clean up some of the rcp code.
[...]
> @@ -75,8 +75,7 @@
>         char *ep;
>=20
>         if (*cp =3D=3D '[') {
> -               ep =3D cp + (strlen(cp) - 1);
> -               if (*ep =3D=3D ']') {
> +               if ( ( ep =3D cp + (strlen(cp) - 1)) =3D=3D ']') {
>                         *ep =3D '\0';
>                         ++cp;
>                 }

See how the way you write it is more prone to errors.  Enthusiasm is
good;  now I guess you understand how easily bugs can be introduced.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--GTGEtWEe6jD60dxL
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRIiWAtgoQloHrPnoAQIB0ggAiOuV7kxg3JiAvJnoiLp5Jn13QoKtT4Bp
1FJqBAqcALPZkDhjfPWZibMgt+xayBoj0MbKMq4wKL0cJzUxmCzKNxjBpfU94sPy
J8xj9j1vNdVLl48v4XOAUn7tl3AwjeKuQ9FQk/zgkiRGrEf/8ffQ7Cf2KOapIEQi
oi3xubZ4ZkY7nv/CPt3kFQNGUSCosJlqrqBBnGOvhpHnKWzmiILIylTYVQuBFAQT
0WmBmi+qG+nZKRAFl5DwES83/JsVxHcWcNMYpa1zbJxq0IS6d3iQPSh4neHpIxLA
jl9X8MiYxfxRDij7WLbx0TRnkvGXZzVaTkeUXkARV+LRohQ9oFWk1Q==
=IKXW
-----END PGP SIGNATURE-----

--GTGEtWEe6jD60dxL--