This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2c9627e9c07db36bea215d4c6968b0fb9743080f commit 2c9627e9c07db36bea215d4c6968b0fb9743080f Author: Guillem Jover <[email protected]> AuthorDate: Sun Nov 27 00:56:04 2022 +0100 dpkg-trigger: Turn do_check() into a cipaction function This will make it possible to declare it with an ACTION macro. Changelog: internal --- src/trigger/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/trigger/main.c b/src/trigger/main.c index 364b39372..35c3a2202 100644 --- a/src/trigger/main.c +++ b/src/trigger/main.c @@ -215,10 +215,13 @@ do_trigger(const char *const *argv) } static int -do_check(void) +do_check(const char *const *argv) { enum trigdef_update_status uf; + if (*argv) + badusage(_("--%s takes no arguments"), "check-supported"); + uf = trigdef_update_start(TDUF_NO_LOCK_OK); switch (uf) { case TDUS_ERROR_NO_DIR: @@ -261,10 +264,7 @@ main(int argc, const char *const *argv) admindir = dpkg_db_set_dir(admindir); if (f_check) { - if (*argv) - badusage(_("--%s takes no arguments"), - "check-supported"); - return do_check(); + ret = do_check(argv); } else { ret = do_trigger(argv); } -- Dpkg.Org's dpkg

