X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=privcache.c;fp=privcache.c;h=50da4b5a5611950b637432ba1fc1964aedf83ca8;hb=c52b7f938b6bd42d73f557b8b07ac9d751add3be;hp=0ad6a0eb8ca1912dfba9d2dcb41810b47ea54015;hpb=1b8af2f7f86131a5364f2270865895ea597c591e;p=secnet.git diff --git a/privcache.c b/privcache.c index 0ad6a0e..50da4b5 100644 --- a/privcache.c +++ b/privcache.c @@ -171,10 +171,7 @@ static list_t *privcache_apply(closure_t *self, struct cloc loc, buffer_new(&st->databuf,buflen+1); const char *path=dict_read_string(dict,"privkeys",True,"privcache",loc); - int l=strlen(path); - NEW_ARY(st->path.buffer,l+KEYIDSZ*2+1); - strcpy(st->path.buffer,path); - st->path.write_here=st->path.buffer+l; + pathprefix_template_init(&st->path,path,KEYIDSZ*2); st->defhash=find_cl_if(dict,"hash",CL_HASH,False,"site",loc);