chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b8af2f
)
privcache: Use new pathprefix_template facility
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 8 Oct 2019 16:22:49 +0000
(17:22 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 13:15:49 +0000
(13:15 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
privcache.c
patch
|
blob
|
history
diff --git
a/privcache.c
b/privcache.c
index 0ad6a0eb8ca1912dfba9d2dcb41810b47ea54015..50da4b5a5611950b637432ba1fc1964aedf83ca8 100644
(file)
--- 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);