From d06469860c9ca104d994011ea8f10f7ba509857b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 28 Jun 2008 06:32:43 +0300 Subject: [PATCH] libdpkg: Make badusage use ohshit instead of its own error handling --- ChangeLog | 5 +++++ lib/ehandle.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f7d077e..a850820d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-28 Guillem Jover + + * lib/ehandle.c (badusage): Use ohshit instead of its own error + handling. + 2008-06-28 Guillem Jover * src/query.c (printforhelp): Remove trailing newlines. diff --git a/lib/ehandle.c b/lib/ehandle.c index 5d857ede..46a28bff 100644 --- a/lib/ehandle.c +++ b/lib/ehandle.c @@ -275,9 +275,8 @@ void badusage(const char *fmt, ...) { va_start(al,fmt); vsnprintf(buf,sizeof(buf), fmt,al); va_end(al); - snprintf(errmsgbuf,sizeof(errmsgbuf),"%s\n\n%s", buf, gettext(printforhelp)); - errmsg= errmsgbuf; - longjmp(*econtext->jbufp,1); + + ohshit("%s\n\n%s", buf, gettext(printforhelp)); } void werr(const char *fn) { -- 2.39.5