From 7b03fcfcf042c6628d94172b768a5959a8b6f0ab Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 25 Sep 2007 10:35:44 +0000 Subject: [PATCH] Constification of certain storage functions git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2038 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/stevedore.h | 4 ++-- varnish-cache/bin/varnishd/storage_file.c | 4 ++-- varnish-cache/bin/varnishd/storage_malloc.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/varnish-cache/bin/varnishd/stevedore.h b/varnish-cache/bin/varnishd/stevedore.h index 321796f9..adc66210 100644 --- a/varnish-cache/bin/varnishd/stevedore.h +++ b/varnish-cache/bin/varnishd/stevedore.h @@ -38,8 +38,8 @@ struct iovec; typedef void storage_init_f(struct stevedore *, const char *spec); typedef void storage_open_f(struct stevedore *); typedef struct storage *storage_alloc_f(struct stevedore *, size_t size); -typedef void storage_trim_f(struct storage *, size_t size); -typedef void storage_free_f(struct storage *); +typedef void storage_trim_f(const struct storage *, size_t size); +typedef void storage_free_f(const struct storage *); struct stevedore { const char *name; diff --git a/varnish-cache/bin/varnishd/storage_file.c b/varnish-cache/bin/varnishd/storage_file.c index 0aed4ba7..4ff21037 100644 --- a/varnish-cache/bin/varnishd/storage_file.c +++ b/varnish-cache/bin/varnishd/storage_file.c @@ -660,7 +660,7 @@ smf_alloc(struct stevedore *st, size_t size) /*--------------------------------------------------------------------*/ static void -smf_trim(struct storage *s, size_t size) +smf_trim(const struct storage *s, size_t size) { struct smf *smf; struct smf_sc *sc; @@ -688,7 +688,7 @@ smf_trim(struct storage *s, size_t size) /*--------------------------------------------------------------------*/ static void -smf_free(struct storage *s) +smf_free(const struct storage *s) { struct smf *smf; struct smf_sc *sc; diff --git a/varnish-cache/bin/varnishd/storage_malloc.c b/varnish-cache/bin/varnishd/storage_malloc.c index 6f62fd4f..b06c0a25 100644 --- a/varnish-cache/bin/varnishd/storage_malloc.c +++ b/varnish-cache/bin/varnishd/storage_malloc.c @@ -66,7 +66,7 @@ sma_alloc(struct stevedore *st, size_t size) } static void -sma_free(struct storage *s) +sma_free(const struct storage *s) { struct sma *sma; @@ -79,7 +79,7 @@ sma_free(struct storage *s) } static void -sma_trim(struct storage *s, size_t size) +sma_trim(const struct storage *s, size_t size) { struct sma *sma; void *p; -- 2.39.5