[master] 8bd29f9 Don't hard code array size
Martin Blix Grydeland
martin at varnish-cache.org
Tue Oct 1 14:48:18 CEST 2013
commit 8bd29f9cb8b40f000af59f2b9ebbb7baaffcd2c8
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon Sep 23 13:28:37 2013 +0200
Don't hard code array size
diff --git a/include/vapi/vsl.h b/include/vapi/vsl.h
index feb2faa..8aa9152 100644
--- a/include/vapi/vsl.h
+++ b/include/vapi/vsl.h
@@ -63,6 +63,7 @@ enum VSL_transaction_e {
VSL_t_esireq,
VSL_t_bereq,
VSL_t_raw,
+ VSL_t__MAX,
};
struct VSL_transaction {
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index a5c9108..0889f54 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -201,7 +201,7 @@ VSL_Match(struct VSL_data *vsl, const struct VSL_cursor *c)
return (1);
}
-static const char * const VSL_transactions[256] = {
+static const char * const VSL_transactions[VSL_t__MAX] = {
/* 12345678901234 */
[VSL_t_unknown] = "<< Unknown >>",
[VSL_t_sess] = "<< Session >>",
More information about the varnish-commit
mailing list