From: Edgar Toernig Date: Fri, 13 May 2005 11:15:31 GMT Subject: Re: [PATCH 3/4] Pull refs by HTTP Message-ID: <20050513131531.4317677b.froese@gmx.de> In-Reply-To: Daniel Barkalow wrote: > > + url = xmalloc(strlen(base) + 7 + strlen(dir) + strlen(name)); > + strcpy(url, base); > + posn = url + strlen(base); > + strcpy(posn, "refs/"); > + posn += 5; > + strcpy(posn, dir); > + posn += strlen(dir); > + *(posn++) = '/'; > + strcpy(posn, name); Have you ever heard of sprintf & co? sprintf(url, "%srefs/%s/%s", base, dir, name); Ciao, ET.