From: Ian Jackson Date: Sat, 7 Dec 2019 16:31:08 +0000 (+0000) Subject: privcache: Break out DEFAULT_MAXPRIV_BYTES X-Git-Tag: v0.6.0~39 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=328b84f50045a70a56b8a8b61fd0d4644b7bf6d1;p=secnet.git privcache: Break out DEFAULT_MAXPRIV_BYTES We're going to reuse this. No functional change. Signed-off-by: Ian Jackson --- diff --git a/privcache.c b/privcache.c index ba5ddc9..719a2d0 100644 --- a/privcache.c +++ b/privcache.c @@ -21,6 +21,7 @@ #include "util.h" #define DEFAULT_SIZE 5 +#define DEFAULT_MAXPRIV_BYTES 4095 struct ent { struct sigkeyid id; @@ -207,7 +208,7 @@ static list_t *privcache_apply(closure_t *self, struct cloc loc, st->used=0; int32_t buflen=dict_read_number(dict,"privkey-max",False,"privcache",loc, - 4095); + DEFAULT_MAXPRIV_BYTES); buffer_new(&st->databuf,buflen+1); const char *path=dict_read_string(dict,"privkeys",True,"privcache",loc);