Explorar el Código

libdpkg: Make badusage use ohshit instead of its own error handling

Guillem Jover hace 18 años
padre
commit
d06469860c
Se han modificado 2 ficheros con 7 adiciones y 3 borrados
  1. 5 0
      ChangeLog
  2. 2 3
      lib/ehandle.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-06-28  Guillem Jover  <guillem@debian.org>
+
+	* lib/ehandle.c (badusage): Use ohshit instead of its own error
+	handling.
+
 2008-06-28  Guillem Jover  <guillem@debian.org>
 
 	* src/query.c (printforhelp): Remove trailing newlines.

+ 2 - 3
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) {