diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-07-05 14:48:59 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-09 02:30:13 -0700 |
commit | 2192cabb7adae528ebc411cd479cdc74804abd14 (patch) | |
tree | d4456608a99def4865904333bc1adb3bbe683345 | |
parent | 84a183ef2eadf48735a9319773b990f30e2fd575 (diff) | |
download | grep-2192cabb7adae528ebc411cd479cdc74804abd14.tar.gz |
grep: simplify EGexecute
* src/dfasearch.c (EGexecute): Remove a label and goto.
This also makes the machine code a bit shorter, on x86-64 gcc.
-rw-r--r-- | src/dfasearch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dfasearch.c b/src/dfasearch.c index ef522188..d6afa8d3 100644 --- a/src/dfasearch.c +++ b/src/dfasearch.c @@ -376,7 +376,7 @@ EGexecute (void *vdc, char const *buf, size_t size, size_t *match_size, buflim - beg + dc->begline, &kwsm, true); if (offset < 0) - goto failure; + return offset; match = beg + offset; prev_beg = beg; @@ -579,7 +579,6 @@ EGexecute (void *vdc, char const *buf, size_t size, size_t *match_size, } } /* for (beg = end ..) */ - failure: return -1; success: |