diff options
author | Omar Polo <op@omarpolo.com> | 2021-03-31 16:32:18 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-03-31 16:32:18 +0000 |
commit | b8e64ccd44290cdd34bdcd3fd85fb1a9cb7486dd (patch) | |
tree | 0e419f355bb2bda7a099fd1c113e1c04f7dfe723 /utils.c | |
parent | e0ebdf2d94159db669a67972b760d1920f11310b (diff) |
list instead of fixed-size array for vhosts and locations
saves some bytes of memory and removes the limit on the maximum number
of vhosts and location blocks.
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -96,6 +96,16 @@ xstrdup(const char *s) return d; } +void * +xcalloc(size_t nmemb, size_t size) +{ + void *d; + + if ((d = calloc(nmemb, size)) == NULL) + err(1, "calloc"); + return d; +} + void gen_certificate(const char *hostname, const char *certpath, const char *keypath) { |