mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
journal: remove unnecessary HAVE_PCRE2 check
Since HAVE_PCRE2 checks are performed in pcre2-util.c, there is no need for this extra check in journalctl.c.
This commit is contained in:
committed by
Lennart Poettering
parent
2e3bb01d79
commit
8beffbac69
@@ -2732,14 +2732,12 @@ int main(int argc, char *argv[]) {
|
||||
finish:
|
||||
pager_close();
|
||||
|
||||
#if HAVE_PCRE2
|
||||
if (arg_compiled_pattern && r == 0 && n_shown == 0)
|
||||
/* --grep was used, no error was thrown, but the pattern didn't
|
||||
* match anything. Let's mimic grep's behavior here and return
|
||||
* a non-zero exit code, so journalctl --grep can be used
|
||||
* in scripts and such */
|
||||
r = -ENOENT;
|
||||
#endif
|
||||
|
||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user