Commit bcb5ae91 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Constification of certain storage functions


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2038 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 172b1789
...@@ -38,8 +38,8 @@ struct iovec; ...@@ -38,8 +38,8 @@ struct iovec;
typedef void storage_init_f(struct stevedore *, const char *spec); typedef void storage_init_f(struct stevedore *, const char *spec);
typedef void storage_open_f(struct stevedore *); typedef void storage_open_f(struct stevedore *);
typedef struct storage *storage_alloc_f(struct stevedore *, size_t size); typedef struct storage *storage_alloc_f(struct stevedore *, size_t size);
typedef void storage_trim_f(struct storage *, size_t size); typedef void storage_trim_f(const struct storage *, size_t size);
typedef void storage_free_f(struct storage *); typedef void storage_free_f(const struct storage *);
struct stevedore { struct stevedore {
const char *name; const char *name;
......
...@@ -660,7 +660,7 @@ smf_alloc(struct stevedore *st, size_t size) ...@@ -660,7 +660,7 @@ smf_alloc(struct stevedore *st, size_t size)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
smf_trim(struct storage *s, size_t size) smf_trim(const struct storage *s, size_t size)
{ {
struct smf *smf; struct smf *smf;
struct smf_sc *sc; struct smf_sc *sc;
...@@ -688,7 +688,7 @@ smf_trim(struct storage *s, size_t size) ...@@ -688,7 +688,7 @@ smf_trim(struct storage *s, size_t size)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
smf_free(struct storage *s) smf_free(const struct storage *s)
{ {
struct smf *smf; struct smf *smf;
struct smf_sc *sc; struct smf_sc *sc;
......
...@@ -66,7 +66,7 @@ sma_alloc(struct stevedore *st, size_t size) ...@@ -66,7 +66,7 @@ sma_alloc(struct stevedore *st, size_t size)
} }
static void static void
sma_free(struct storage *s) sma_free(const struct storage *s)
{ {
struct sma *sma; struct sma *sma;
...@@ -79,7 +79,7 @@ sma_free(struct storage *s) ...@@ -79,7 +79,7 @@ sma_free(struct storage *s)
} }
static void static void
sma_trim(struct storage *s, size_t size) sma_trim(const struct storage *s, size_t size)
{ {
struct sma *sma; struct sma *sma;
void *p; void *p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment