Mailing List Archive

[master] fa988f5a5 Constify struct symtab
commit fa988f5a53bd28dd8574827d4338b3f9679ef1db
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Thu Jun 4 17:13:53 2020 +0200

Constify struct symtab

Children shouldn't be able to mess with their parents, even though in
practice they do.

diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c
index bf33292e4..6784ef48b 100644
--- a/lib/libvcc/vcc_symb.c
+++ b/lib/libvcc/vcc_symb.c
@@ -49,7 +49,7 @@ struct symtab {
#define SYMTAB_MAGIC 0x084d9c8a
unsigned nlen;
const char *name;
- struct symtab *parent;
+ const struct symtab *parent;
VTAILQ_ENTRY(symtab) list;
VTAILQ_HEAD(,symtab) children;
VTAILQ_HEAD(,symbol) symbols;
@@ -196,7 +196,7 @@ static struct symbol *
vcc_sym_in_tab(struct vcc *tl, struct symtab *st,
vcc_kind_t kind, int vlo, int vhi)
{
- struct symtab *pst;
+ const struct symtab *pst;
struct symbol *sym, *psym;

VTAILQ_FOREACH(sym, &st->symbols, list) {
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit