diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 11:28:39 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 11:28:39 -0800 |
| commit | 0b0e99bfac8e11463ae15211882aab98ba150dcb (patch) | |
| tree | bbcce8c175438e8f6152207c9cd9099942230b2f /match.c | |
| parent | e98574570ec0e355c6cff2b6e30bd992f20fe610 (diff) | |
A few more pedantic cleanups
Diffstat (limited to 'match.c')
| -rw-r--r-- | match.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -271,7 +271,7 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool match_t *mp = match(defs, f, str, pat->args.repetitions.repeat_pat, ignorecase); if (mp == NULL) { str = start; - recycle_if_unused(&msep); + if (msep) recycle_if_unused(&msep); break; } if (mp->end == start && reps > 0) { @@ -281,7 +281,7 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool // the next loop either. We know that this will continue to // loop until reps==max, so let's just cut to the chase // instead of looping infinitely. - recycle_if_unused(&msep); + if (msep) recycle_if_unused(&msep); recycle_if_unused(&mp); if (pat->args.repetitions.max == -1) reps = ~(size_t)0; @@ -573,7 +573,6 @@ match_t *get_capture(match_t *m, const char **id) if (**id == ';') ++(*id); return cap; } - return NULL; } // |
