From c52b7f938b6bd42d73f557b8b07ac9d751add3be Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 8 Oct 2019 17:22:49 +0100 Subject: [PATCH] privcache: Use new pathprefix_template facility Signed-off-by: Ian Jackson --- privcache.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); -- 2.30.2