Subject: Re: i386 build fails at running fc-cache
To: Aidan Kehoe <kehoea@parhasard.net>
From: Luke Mewburn <lukem@NetBSD.org>
List: current-users
Date: 02/03/2004 00:09:50
--PuGuTyElPB9bOcsM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 02, 2004 at 01:07:33PM +0000, Aidan Kehoe wrote:
  |=20
  |  Ar an 2? l? de m? 2, scr?obh Aidan Kehoe :
  |=20
  |  > Yeah. The off-by-two bug is a seperate issue.=20
  |=20
  | Ah, but I'm wrong. The original code was the below;=20
  |=20
  |     if (*s =3D=3D '~')
  |     {
  |     FcChar8	*home =3D (FcChar8 *) getenv ("HOME");
  |     int		size =3D strlen ((char *) home) + strlen ((char *) s);
  |     if (!home)
  |         return 0;
  | 	new =3D (FcChar8 *) malloc (size);
  | 	if (!new)
  | 	    return 0;
  | 	    FcMemAlloc (FC_MEM_STRING, size);
  | 	    strcpy ((char *) new, (char *) home);
  | 	    strcat ((char *) new, (char *) s + 1);
  |     }
  |=20
  | Since strlen(s) includes the '~' in its count, and the string that is c=
opied
  | into new doesn't include the '~', there's no need to add the one.=20

Right ...

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

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

iD8DBQFAHkwepBhtmn8zJHIRAmuQAJ4tN/55KSntPna6ZbwZEd0r6edVFACeL2tI
oQ9e0IwPKzaTPb3s6H8i6qo=
=sk1w
-----END PGP SIGNATURE-----

--PuGuTyElPB9bOcsM--