This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
commit 4a6e59ebda3148aeffcab80db57bf114436232b0 Author: Guillem Jover <guil...@debian.org> Date: Sun Mar 25 16:36:29 2018 +0200 s-s-d: Add support for new bug() function and BUG() macro These will take care of reporting internal errors or programming bugs in the code. --- utils/start-stop-daemon.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 8135750..44ae328 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -302,6 +302,25 @@ fatal(const char *format, ...) exit(2); } +#define BUG(...) bug(__FILE__, __LINE__, __func__, __VA_ARGS__) + +static void DPKG_ATTR_NORET DPKG_ATTR_PRINTF(4) +bug(const char *file, int line, const char *func, const char *format, ...) +{ + va_list arglist; + + fprintf(stderr, "%s:%s:%d:%s: internal error: ", + progname, file, line, func); + va_start(arglist, format); + vfprintf(stderr, format, arglist); + va_end(arglist); + + if (action == ACTION_STATUS) + exit(STATUS_UNKNOWN); + else + exit(3); +} + static void * xmalloc(int size) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/dpkg/dpkg.git