diff options
author | katerina.kubecova <katerina.kubecova@nic.cz> | 2023-09-18 14:43:58 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-09-20 14:03:05 +0200 |
commit | bb8e28248be0ad1f728433e4884dfe2db3772b30 (patch) | |
tree | 73f122301f8f02fe0b5d17ef5d28d30c07866326 /conf | |
parent | 9ffea830b673a8b8506877a371e0c9fc52c99b94 (diff) |
Structures bytestring and adata merged into adata.
Diffstat (limited to 'conf')
-rw-r--r-- | conf/cf-lex.l | 4 | ||||
-rw-r--r-- | conf/conf.h | 4 | ||||
-rw-r--r-- | conf/confbase.Y | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index dd62e31a..28479ff3 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -244,7 +244,7 @@ WHITE [ \t] ({XIGIT}{2}){16,}|{XIGIT}{2}(:{XIGIT}{2}){15,}|hex:({XIGIT}{2}(:?{XIGIT}{2})*)? { char *s = yytext; - struct bytestring *bs; + struct adata *bs; /* Skip 'hex:' prefix */ if (s[0] == 'h' && s[1] == 'e' && s[2] == 'x' && s[3] == ':') @@ -254,7 +254,7 @@ WHITE [ \t] if (len < 0) cf_error("Invalid hex string"); - bs = cfg_allocz(sizeof(struct bytestring) + len); + bs = cfg_allocz(sizeof(struct adata) + len); bs->length = bstrhextobin(s, bs->data); ASSERT(bs->length == len); diff --git a/conf/conf.h b/conf/conf.h index c301df1d..486499ad 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -154,10 +154,6 @@ extern struct sym_scope *global_root_scope; extern pool *global_root_scope_pool; extern linpool *global_root_scope_linpool; -struct bytestring { - size_t length; - byte data[]; -}; #define SYM_MAX_LEN 64 diff --git a/conf/confbase.Y b/conf/confbase.Y index 7b368fc6..0364bc6e 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -94,7 +94,7 @@ CF_DECLS struct channel_limit cl; struct timeformat *tf; mpls_label_stack *mls; - const struct bytestring *bs; + const struct adata *bs; } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT |