This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=74275126bcd2bb7bd02e9b998045990b679b19cf commit 74275126bcd2bb7bd02e9b998045990b679b19cf Author: Guillem Jover <[email protected]> AuthorDate: Sun Oct 14 18:08:35 2018 +0200 dpkg: Negate tortoise_not_in_hare() function name and return value Makes its usage more obvious. --- debian/changelog | 1 + src/trigproc.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index aa84c615e..2e883c3a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -77,6 +77,7 @@ dpkg (1.19.3) UNRELEASED; urgency=medium - start-stop-daemon: Switch code to use new info() and debug() functions. - update-alternatives: Use enums for actions instead of strings. - update-alternatives: Switch verbose selection into an enum. + - dpkg: Negate tortoise_not_in_hare() function name and return value. * Build system: - get-version: Use a format string with printf. - run-script: Use $() instead of deprecated ``. diff --git a/src/trigproc.c b/src/trigproc.c index 4aee33a80..4f9de36ff 100644 --- a/src/trigproc.c +++ b/src/trigproc.c @@ -207,8 +207,8 @@ trigproc_reset_cycle(void) } static bool -tortoise_not_in_hare(struct pkginfo *processing_now, - struct trigcycleperpkg *tortoise_pkg) +tortoise_in_hare(struct pkginfo *processing_now, + struct trigcycleperpkg *tortoise_pkg) { const char *processing_now_name, *tortoise_name; struct trigpend *hare_trig, *tortoise_trig; @@ -241,11 +241,11 @@ tortoise_not_in_hare(struct pkginfo *processing_now, /* Not found in hare, yay! */ debug(dbg_triggersdetail, "%s pnow=%s tortoise=%s OK", __func__, processing_now_name, tortoise_name); - return true; + return false; } } - return false; + return true; } /* @@ -301,7 +301,7 @@ check_trigger_cycle(struct pkginfo *processing_now) for (tortoise_pkg = tortoise->pkgs; tortoise_pkg; tortoise_pkg = tortoise_pkg->next) { - if (tortoise_not_in_hare(processing_now, tortoise_pkg)) + if (!tortoise_in_hare(processing_now, tortoise_pkg)) return NULL; } /* Oh dear. hare is a superset of tortoise. We are making no -- Dpkg.Org's dpkg

