r2038 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Sep 25 12:35:44 CEST 2007
Author: phk
Date: 2007-09-25 12:35:44 +0200 (Tue, 25 Sep 2007)
New Revision: 2038
Modified:
trunk/varnish-cache/bin/varnishd/stevedore.h
trunk/varnish-cache/bin/varnishd/storage_file.c
trunk/varnish-cache/bin/varnishd/storage_malloc.c
Log:
Constification of certain storage functions
Modified: trunk/varnish-cache/bin/varnishd/stevedore.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/stevedore.h 2007-09-25 10:32:24 UTC (rev 2037)
+++ trunk/varnish-cache/bin/varnishd/stevedore.h 2007-09-25 10:35:44 UTC (rev 2038)
@@ -38,8 +38,8 @@
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;
Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c 2007-09-25 10:32:24 UTC (rev 2037)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c 2007-09-25 10:35:44 UTC (rev 2038)
@@ -660,7 +660,7 @@
/*--------------------------------------------------------------------*/
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 @@
/*--------------------------------------------------------------------*/
static void
-smf_free(struct storage *s)
+smf_free(const struct storage *s)
{
struct smf *smf;
struct smf_sc *sc;
Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2007-09-25 10:32:24 UTC (rev 2037)
+++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2007-09-25 10:35:44 UTC (rev 2038)
@@ -66,7 +66,7 @@
}
static void
-sma_free(struct storage *s)
+sma_free(const struct storage *s)
{
struct sma *sma;
@@ -79,7 +79,7 @@
}
static void
-sma_trim(struct storage *s, size_t size)
+sma_trim(const struct storage *s, size_t size)
{
struct sma *sma;
void *p;
More information about the varnish-commit
mailing list