Browse Source

tools/check-bolt: don't get confused by 'BOLT #1' in middle of a comment.

Insist it be prefixed with '* '.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
committed by neil saitug
parent
commit
51d7a1404f
  1. 7
      tools/check-bolt.c

7
tools/check-bolt.c

@ -102,9 +102,14 @@ static char *find_bolt_ref(const char *prefix, char **p, size_t *len)
size_t preflen; size_t preflen;
/* BOLT #X: */ /* BOLT #X: */
*p = strstr(*p, prefix); *p = strchr(*p, '*');
if (!*p) if (!*p)
return NULL; return NULL;
*p += 1;
while (cisspace(**p))
(*p)++;
if (strncmp(*p, prefix, strlen(prefix)) != 0)
continue;
*p += strlen(prefix); *p += strlen(prefix);
while (cisspace(**p)) while (cisspace(**p))
(*p)++; (*p)++;

Loading…
Cancel
Save