diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-03 16:11:17 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-03 16:11:17 -0500 |
| commit | a92f70571fbd722de86dc9d84caa7642cd841251 (patch) | |
| tree | b9da0b7f09b87ec24b2db7245129a69d3ec75393 | |
| parent | fd751ecedfde19f301cb5e8e097ea1ae18eadd6f (diff) | |
Update some annotations
| -rw-r--r-- | match.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -222,10 +222,9 @@ void cache_destroy(match_ctx_t *ctx) // // Look up a pattern definition by name from a definition pattern. // -__attribute__((nonnull(2))) static bp_pat_t *_lookup_def(match_ctx_t *ctx, bp_pat_t *defs, const char *name, size_t namelen) { - while (defs) { + while (defs != NULL) { if (defs->type == BP_CHAIN) { auto chain = When(defs, BP_CHAIN); bp_pat_t *second = _lookup_def(ctx, chain->second, name, namelen); @@ -247,7 +246,7 @@ static bp_pat_t *_lookup_def(match_ctx_t *ctx, bp_pat_t *defs, const char *name, // // Look up a pattern definition by name from a context. // -__attribute__((nonnull)) +__attribute__((nonnull(2))) bp_pat_t *lookup_ctx(match_ctx_t *ctx, const char *name, size_t namelen) { for (; ctx; ctx = ctx->parent_ctx) { |
